Opened 4 years ago
Last modified 2 years ago
#13304 new enhancement
Implement code formatting and style checking tools — at Version 2
Reported by: | Ryan J Ollos | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | next-dev-1.7.x |
Component: | general | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
(from comment:93:ticket:12130)
In the release checklist, reindent
is used to fix indentation. pypi:reindent doesn't support Python 3. It appears it's just packaged reindent.py from the Python Core. I've emailed the package owner to see if I can get maintainership to update it for Python 3.5+.
Use formatting and style checking tools such as:
Other candidates are:
Implement ignore rules, as needed, in setup.cfg
. Example:
[pycodestyle] max-line-length = 80 ignore = E126, E127, E128, E129, E131, E241, E731
Format code to remove all warnings and errors.
Add a Makefile command make check-code
, which executes the style check tool and contrib/jinja2checker.py
. The tool can be run before submitting a "pull request" and before releases.
Revise as needed:
- TracDev/CodingStyle
- TracDev/DevelopmentWorkflow
- TracDev/ReleaseChecklist
- TracDev/SubmittingPatches
- TracDev/UnitTests
- TracDev/FunctionalTests
make status
echoes the version of pypi:coverage, but the tool isn't integrated into our development process, as far as I'm aware. It's use should be documented, or remove it from make status
.
$ make status Python: /Users/rjollos/.pyenv/shims/python Package Version ---------------------------------------------------------------------------- Python : 3.6.10 (default, Jan 27 2020, 16:14:13) : [GCC 4.2.1 Compatible Apple LLVM 11.0.0 (clang-1100.0.33.17)] Setuptools : 46.4.0 Pip : 20.1.1 Wheel : 0.34.2 Jinja2 : 2.11.2 Babel : 2.8.0 sqlite3 : 2.6.0 (3.28.0) PySqlite : not installed PyMySQL : 0.9.3 Psycopg2 : 2.8.5 (dt dec pq3 ext lo64) SVN bindings : 1.15.0 (under development) Mercurial : 5.4 Pygments : 2.6.1 Textile : 4.0.1 Pytz : 2020.1 Docutils : 0.16 Selenium : 3.141.0 LXML : 4.5.1 coverage : 5.1 Variables: ...
Consider adding a requirements-dev.txt
for installing all development requirements.
Change History (2)
comment:1 by , 4 years ago
Description: | modified (diff) |
---|
comment:2 by , 4 years ago
Description: | modified (diff) |
---|