Isortwhich is part of the Python extensions
Python Refactortoolkit (
Python Refactor: Sort Imports).
isortby pressing SHIFT+CMD+P and selecting
Python Refactor: Sort Imports.
Isortdefaults to 79 to match PEP-8, so a line length must be configured to avoid style conflicts.
"""which deviates from standard practice (per PEP-8). Further, the use of grave accents, asterisks ( * ), and colons ( : ). are all purposeful and important. Django and
docutilsconvert these symbols into formatting for the auto-generated documentation in the admin panel.
flake8to lint Ghostwriter's code. The VSCode Python extension natively supports linting and a variety of linters.
flake8because this linter is much faster and snappier – especially with some of Ghostwriter's longer Python files (e.g., a views.py). The
flake8linter is logical and stylistic, like
PyLint. Black should handle most of the linting, but it won't flag unused imports.
pip install pre-commitfor your local development environment.
.pre-commit-config.yamlfile to the project's root directory. Use the example below as a model for this file.
pre-commit installto hook future git commits.