add pre-commit config for flake8
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Jon S. Stumpf · committed by David Lord · parent b61cbf8 · Browse files · 6 files·+41 added−6 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
6 files+41 added−6 removed
- tests:+1 added−1 removed
- other:+40 added−5 removed
Provenance
- Commit
549fed2- Tree
287a11b- Author
Jon S. Stumpf <jon.stumpf@gmail.com>- Committer
David Lord <davidism@gmail.com>- Parent
b61cbf8
6 files changed+41 added−6 removed
modified:docs/patterns/appfactories.rst+3 added-3 removed
91 unmodified lines92 To run such an application, you can use the :command:`flask` command::93 94 $ export FLASK_APP=myapp95 $ flask run96- 97-Flask will automatically detect the factory (``create_app`` or ``make_app``) 96+97+Flask will automatically detect the factory (``create_app`` or ``make_app``)98 in ``myapp``. You can also pass arguments to the factory like this::99 100 $ export FLASK_APP="myapp:create_app('dev')"101 $ flask run102- 102+103 Then the ``create_app`` factory in ``myapp`` is called with the string104 ``'dev'`` as the argument. See :doc:`/cli` for more detail.105 106 Factory Improvements11 unmodified linesmodified:docs/flaskstyle.sty+1 added-1 removed
7 unmodified lines8 \renewcommand{\maketitle}{%9 \begin{titlepage}%10 \let\footnotesize\small11 \let\footnoterule\relax12- % Apply following fix only on PDF output, i.e. pdfoutput macro is not 12+ % Apply following fix only on PDF output, i.e. pdfoutput macro is not13 % undefined14 \ifx\pdfoutput\undefined\else15 \begingroup16 % This \def is required to deal with multi-line authors; it108 unmodified linesmodified:docs/Makefile+1 added-1 removed
15 unmodified lines16 17 # Catch-all target: route all unknown targets to Sphinx using the new18 # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).19 %: Makefile20- @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)20+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)modified:tests/templates/template_filter.html+1 added-1 removed
11{{ value|super_reverse }}No newline at end of file{{ value|super_reverse }}modified:.pre-commit-config.yaml+11 added
12345678910111213141516repos: - repo: https://github.com/python/black rev: 19.3b0 hooks: - id: black - repo: https://gitlab.com/pycqa/flake8 rev: 3.7.7 hooks: - id: flake8 additional_dependencies: [flake8-bugbear] - repo: https://github.com/pre-commit/pre-commit-hooks rev: v2.1.0 hooks: - id: check-byte-order-marker - id: trailing-whitespace - id: end-of-file-fixermodified:setup.cfg+24 added
20 unmodified lines21 source =22 flask23 .tox/*/lib/python*/site-packages/flask24 .tox/pypy/site-packages/flask25+26+[flake8]27+# B = bugbear28+# E = pycodestyle errors29+# F = flake8 pyflakes30+# W = pycodestyle warnings31+# B9 = bugbear opinions32+select = B, E, F, W, B933+ignore =34+ # slice notation whitespace, invalid35+ E20336+ # import at top, too many circular import fixes37+ E40238+ # line length, handled by bugbear B95039+ E50140+ # bare except, handled by bugbear B00141+ E72242+ # bin op line break, invalid43+ W50344+# up to 88 allowed by bugbear B95045+max-line-length = 8046+per-file-ignores =47+ # __init__ modules export names48+ **/__init__.py: F401