#31059 closed enhancement (fixed)

refresh dirichlet.py

Reported by: chapoton Owned by:
Priority: major Milestone: sage-9.3
Component: modular forms Keywords:
Cc: Merged in:
Authors: Frédéric Chapoton Reviewers: Thierry Monteil
Report Upstream: N/A Work issues:
Branch: bca7ef4 (Commits, GitHub, GitLab) Commit: bca7ef402388d920a899052020c1830e91d7c5c7
Dependencies: Stopgaps:

Status badges

Description

including

  • fix lgtm warnings about imports
  • full flake8
  • some doc details
  • some tiny code details
  • Use "Return"

Change History (7)

comment:1 Changed 12 months ago by chapoton

  • Branch set to u/chapoton/31059
  • Commit set to f6da2b659f78763d0dce2faa9e431559757d1dfe
  • Status changed from new to needs_review

New commits:

f6da2b6refresh dirichlet.py

comment:2 Changed 12 months ago by tmonteil

  • Status changed from needs_review to needs_info

I am not sure about flake8 or similar software, but the pep8 considers

g += self(c) * zeta**int(a*e + b*e**(-1))

more readable than

g += self(c) * zeta**int(a * e + b * e**(-1))

see https://www.python.org/dev/peps/pep-0008/#other-recommendations

Also, i am not sure whether and is considered as a binary operator, if yes,

        elif (isinstance(R, number_field.NumberField_generic)
              and euler_phi(self.order()) < R.absolute_degree()):

should not be replaced with:

        elif (isinstance(R, number_field.NumberField_generic) and
              euler_phi(self.order()) < R.absolute_degree()):

see https://www.python.org/dev/peps/pep-0008/#should-a-line-break-before-or-after-a-binary-operator

comment:3 Changed 12 months ago by chapoton

Salut ! comme on entre dans des histoires de gout, la polemique n'est pas loin. L'avantage de flake8 de mon point de vue est de voir (dans mon editeur preféré) directement en tapant un fichier qu'il ne contient aucune erreur.

Page de flake8 : https://pypi.org/project/flake8/

Concernant "and", il semble qu'il y ait une certaine fluctuation, puisqu'on peut choisir quelle option on considere comme erreur dans les parametres de flake8.

comment:4 Changed 12 months ago by git

  • Commit changed from f6da2b659f78763d0dce2faa9e431559757d1dfe to bca7ef402388d920a899052020c1830e91d7c5c7

Branch pushed to git repo; I updated commit sha1. New commits:

bca7ef4unde change about position of and

comment:5 Changed 12 months ago by chapoton

J'ai défait le changement de la position de "and". Est-ce que ça ira comme ça ?

comment:6 Changed 12 months ago by tmonteil

  • Reviewers set to Thierry Monteil
  • Status changed from needs_info to positive_review

OK, let's go for it.

comment:7 Changed 12 months ago by vbraun

  • Branch changed from u/chapoton/31059 to bca7ef402388d920a899052020c1830e91d7c5c7
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.