From a5f87aed70341c1f1120d1e84c69a04a835d5a74 Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Mon, 2 Sep 2024 14:00:55 +0100 Subject: [PATCH 1/2] rename l_function method name fixes E743 --- pyproject.toml | 2 +- src/flint/types/dirichlet.pyx | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index bfd3dee8..11fe383f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ build-backend = "mesonpy" [tool.cython-lint] max-line-length = 120 -ignore = ['E128','E129','E202','E221','E222','E261','E262','E265','E501','E731','E741','E743'] +ignore = ['E128','E129','E202','E221','E222','E261','E262','E265','E501','E731','E741'] exclude = 'src/flint/flintlib/.*' [tool.spin] diff --git a/src/flint/types/dirichlet.pyx b/src/flint/types/dirichlet.pyx index ff8cab95..2d29ec9e 100644 --- a/src/flint/types/dirichlet.pyx +++ b/src/flint/types/dirichlet.pyx @@ -169,7 +169,7 @@ cdef class dirichlet_char(object): else: return fmpz(v) - def l(self, s): + def l_function(self, s): """ Evaluates the Dirichlet L-function of this character at the given complex number s. @@ -189,6 +189,9 @@ cdef class dirichlet_char(object): acb_dirichlet_l((v).val, (s).val, self.G.val, self.val, getprec()) return v + # For backwards compatibility we allow self.l(s) see Issue #210 + l = l_function # no-cython-lint + def hardy_z(self, s): """ Evaluates the Hardy Z-function of this character at the given From 5af4b6511b855d62a3aca01670126f79c06a31d8 Mon Sep 17 00:00:00 2001 From: Giacomo Pope Date: Mon, 2 Sep 2024 16:21:43 +0100 Subject: [PATCH 2/2] reviewer feedback reviewer feedback --- src/flint/types/dirichlet.pyx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/flint/types/dirichlet.pyx b/src/flint/types/dirichlet.pyx index 2d29ec9e..bbcba021 100644 --- a/src/flint/types/dirichlet.pyx +++ b/src/flint/types/dirichlet.pyx @@ -176,10 +176,10 @@ cdef class dirichlet_char(object): >>> from flint import showgood >>> chi = dirichlet_char(1, 1) - >>> showgood(lambda: chi.l(2), dps=25) + >>> showgood(lambda: chi.l_function(2), dps=25) 1.644934066848226436472415 >>> chi = dirichlet_char(7, 3) - >>> showgood(lambda: chi.l(2+3j), dps=25) + >>> showgood(lambda: chi.l_function(2+3j), dps=25) 1.273313649440490751755284 - 0.07432329442559421607102118j """ @@ -190,7 +190,11 @@ cdef class dirichlet_char(object): return v # For backwards compatibility we allow self.l(s) see Issue #210 - l = l_function # no-cython-lint + def l(self, s): # no-cython-lint + """ + Alias for :meth:`l_function` + """ + return self.l_function(s) def hardy_z(self, s): """