Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: PyCQA/flake8
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.9.2
Choose a base ref
...
head repository: PyCQA/flake8
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4.0.1
Choose a head ref
Loading
Showing with 3,358 additions and 4,279 deletions.
  1. +0 −8 .appveyor.yml
  2. +1 −0 .coveragerc
  3. +33 −0 .github/ISSUE_TEMPLATE.md
  4. +54 −0 .github/workflows/main.yml
  5. +0 −85 .gitlab-ci.yml
  6. +17 −8 .pre-commit-config.yaml
  7. +0 −37 .travis.yml
  8. +10 −2 README.rst
  9. +2 −2 codecov.yml
  10. +89 −83 docs/source/conf.py
  11. +1 −1 docs/source/faq.rst
  12. +4 −4 docs/source/internal/contributing.rst
  13. +12 −21 docs/source/internal/option_handling.rst
  14. +2 −4 docs/source/internal/releases.rst
  15. +0 −15 docs/source/internal/start-to-finish.rst
  16. +1 −6 docs/source/internal/writing-code.rst
  17. +1 −4 docs/source/manpage.rst
  18. +1 −2 docs/source/plugin-development/registering-plugins.rst
  19. +1 −3 docs/source/release-notes/2.3.0.rst
  20. +7 −14 docs/source/release-notes/2.4.0.rst
  21. +1 −4 docs/source/release-notes/2.4.1.rst
  22. +5 −12 docs/source/release-notes/2.5.0.rst
  23. +2 −6 docs/source/release-notes/2.5.1.rst
  24. +4 −11 docs/source/release-notes/3.0.1.rst
  25. +2 −9 docs/source/release-notes/3.0.2.rst
  26. +6 −18 docs/source/release-notes/3.0.3.rst
  27. +3 −12 docs/source/release-notes/3.0.4.rst
  28. +13 −41 docs/source/release-notes/3.1.0.rst
  29. +4 −8 docs/source/release-notes/3.1.1.rst
  30. +3 −5 docs/source/release-notes/3.2.0.rst
  31. +5 −13 docs/source/release-notes/3.2.1.rst
  32. +10 −30 docs/source/release-notes/3.3.0.rst
  33. +8 −24 docs/source/release-notes/3.4.0.rst
  34. +3 −9 docs/source/release-notes/3.4.1.rst
  35. +7 −21 docs/source/release-notes/3.5.0.rst
  36. +20 −76 docs/source/release-notes/3.6.0.rst
  37. +16 −56 docs/source/release-notes/3.7.0.rst
  38. +3 −11 docs/source/release-notes/3.7.1.rst
  39. +7 −23 docs/source/release-notes/3.7.2.rst
  40. +7 −27 docs/source/release-notes/3.7.3.rst
  41. +3 −11 docs/source/release-notes/3.7.4.rst
  42. +3 −11 docs/source/release-notes/3.7.5.rst
  43. +4 −14 docs/source/release-notes/3.7.6.rst
  44. +3 −11 docs/source/release-notes/3.7.7.rst
  45. +8 −26 docs/source/release-notes/3.7.8.rst
  46. +3 −11 docs/source/release-notes/3.7.9.rst
  47. +39 −125 docs/source/release-notes/3.8.0.rst
  48. +4 −12 docs/source/release-notes/3.8.1.rst
  49. +6 −24 docs/source/release-notes/3.8.2.rst
  50. +6 −18 docs/source/release-notes/3.8.3.rst
  51. +4 −10 docs/source/release-notes/3.8.4.rst
  52. +7 −19 docs/source/release-notes/3.9.0.rst
  53. +43 −0 docs/source/release-notes/4.0.0.rst
  54. +15 −0 docs/source/release-notes/4.0.1.rst
  55. +7 −0 docs/source/release-notes/index.rst
  56. +0 −1 docs/source/requirements.txt
  57. +0 −5 docs/source/user/error-codes.rst
  58. +0 −2 docs/source/user/index.rst
  59. +10 −6 docs/source/user/invocation.rst
  60. +36 −26 docs/source/user/options.rst
  61. +1 −77 docs/source/user/using-hooks.rst
  62. +4 −6 docs/source/user/using-plugins.rst
  63. +20 −23 example-plugin/setup.py
  64. +3 −4 example-plugin/src/flake8_example_plugin/__init__.py
  65. +10 −5 example-plugin/src/flake8_example_plugin/off_by_default.py
  66. +5 −5 example-plugin/src/flake8_example_plugin/on_by_default.py
  67. +1 −5 pytest.ini
  68. +19 −25 setup.cfg
  69. +1 −2 setup.py
  70. +4 −8 src/flake8/__init__.py
  71. +1 −6 src/flake8/_compat.py
  72. +4 −4 src/flake8/api/legacy.py
  73. +103 −91 src/flake8/checker.py
  74. +9 −81 src/flake8/exceptions.py
  75. +30 −33 src/flake8/formatting/base.py
  76. +14 −12 src/flake8/formatting/default.py
  77. +62 −50 src/flake8/main/application.py
  78. +3 −3 src/flake8/main/cli.py
  79. +4 −5 src/flake8/main/debug.py
  80. +0 −262 src/flake8/main/git.py
  81. +0 −145 src/flake8/main/mercurial.py
  82. +17 −14 src/flake8/main/options.py
  83. +0 −115 src/flake8/main/setuptools_command.py
  84. +0 −48 src/flake8/main/vcs.py
  85. +8 −7 src/flake8/options/aggregator.py
  86. +22 −78 src/flake8/options/config.py
  87. +99 −95 src/flake8/options/manager.py
  88. +29 −23 src/flake8/plugins/manager.py
  89. +9 −21 src/flake8/plugins/pyflakes.py
  90. +71 −112 src/flake8/processor.py
  91. +22 −16 src/flake8/statistics.py
  92. +101 −99 src/flake8/style_guide.py
  93. +70 −92 src/flake8/utils.py
  94. +1 −1 tests/conftest.py
  95. +2 −1 tests/fixtures/example-code/inline-ignores/E501.py
  96. +3 −3 tests/integration/subdir/aplugin.py
  97. +39 −20 tests/integration/test_aggregator.py
  98. +2 −2 tests/integration/test_api_legacy.py
  99. +159 −80 tests/integration/test_checker.py
  100. +127 −99 tests/integration/test_main.py
  101. +21 −17 tests/integration/test_plugins.py
  102. +7 −7 tests/unit/conftest.py
  103. +25 −23 tests/unit/test_application.py
  104. +63 −63 tests/unit/test_base_formatter.py
  105. +24 −22 tests/unit/test_checker_manager.py
  106. +75 −54 tests/unit/test_config_file_finder.py
  107. +188 −0 tests/unit/test_config_parser.py
  108. +79 −43 tests/unit/test_debug.py
  109. +309 −137 tests/unit/test_decision_engine.py
  110. +27 −42 tests/unit/test_exceptions.py
  111. +11 −28 tests/unit/test_file_checker.py
  112. +237 −168 tests/unit/test_file_processor.py
  113. +8 −7 tests/unit/test_filenameonly_formatter.py
  114. +8 −8 tests/unit/test_get_local_plugins.py
  115. +0 −29 tests/unit/test_git.py
  116. +26 −23 tests/unit/test_legacy_api.py
  117. +0 −225 tests/unit/test_merged_config_parser.py
  118. +4 −4 tests/unit/test_nothing_formatter.py
  119. +21 −19 tests/unit/test_option.py
  120. +124 −116 tests/unit/test_option_manager.py
  121. +44 −39 tests/unit/test_plugin.py
  122. +20 −21 tests/unit/test_plugin_manager.py
  123. +67 −54 tests/unit/test_plugin_type_manager.py
  124. +3 −3 tests/unit/test_pyflakes_codes.py
  125. +0 −33 tests/unit/test_setuptools_command.py
  126. +41 −38 tests/unit/test_statistics.py
  127. +66 −46 tests/unit/test_style_guide.py
  128. +163 −126 tests/unit/test_utils.py
  129. +49 −35 tests/unit/test_violation.py
  130. +3 −24 tox.ini
8 changes: 0 additions & 8 deletions .appveyor.yml

This file was deleted.

1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -30,3 +30,4 @@ exclude_lines =
# Don't complain if non-runnable code isn't run:
^if __name__ == ['"]__main__['"]:$
^\s*if False:
^\s*if TYPE_CHECKING:
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Please read this brief portion of documentation before going any further: http://flake8.pycqa.org/en/latest/internal/contributing.html#filing-a-bug

<!--
*************************************************************************
NOTE: flake8 is a linting framework and does not implement any checks
if you are reporting a problem with a particular check, please track down
the plugin which implements that check.
some common ones:
- F###: https://github.com/pycqa/pyflakes
- E###, W###: https://github.com/pycqa/pycodestyle
*************************************************************************
-->


*Please describe how you installed Flake8*

Example:

```
$ pip install --user flake8
$ brew install flake8
# etc.
```

**Note**: Some *nix distributions patch Flake8 arbitrarily to accommodate incompatible software versions. If you're on one of those distributions, your issue may be closed and you will be asked to open an issue with your distribution package maintainers instead.

*Please provide the exact, unmodified output of `flake8 --bug-report`*

*Please describe the problem or feature*

*If this is a bug report, please explain with examples (and example code) what you expected to happen and what actually happened.*
54 changes: 54 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: main

on:
push:
branches: [main]
tags:
pull_request:

jobs:
main:
strategy:
matrix:
include:
# linux
- os: ubuntu-latest
python: pypy-3.7
toxenv: py
- os: ubuntu-latest
python: 3.6
toxenv: py
- os: ubuntu-latest
python: 3.7
toxenv: py
- os: ubuntu-latest
python: 3.8
toxenv: py
- os: ubuntu-latest
python: 3.9
toxenv: py
- os: ubuntu-latest
python: '3.10.0-alpha - 3.10.999'
toxenv: py
# windows
- os: windows-latest
python: 3.6
toxenv: py
# misc
- os: ubuntu-latest
python: 3.9
toxenv: docs
- os: ubuntu-latest
python: 3.9
toxenv: linters
- os: ubuntu-latest
python: 3.9
toxenv: dogfood
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- run: python -mpip install --upgrade setuptools pip tox virtualenv
- run: tox -e ${{ matrix.toxenv }}
85 changes: 0 additions & 85 deletions .gitlab-ci.yml

This file was deleted.

25 changes: 17 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
exclude: ^tests/fixtures/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
rev: v4.0.1
hooks:
- id: check-yaml
- id: debug-statements
exclude: ^tests/fixtures/example-code/invalid-syntax.py$
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: ^tests/fixtures/diffs/
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.6.0
hooks:
- id: reorder-python-imports
args: [--application-directories, '.:src', --py36-plus]
- repo: https://github.com/psf/black
rev: 20.8b1
rev: 21.9b0
hooks:
- id: black
args: [--line-length=78]
files: ^src/
args: [--line-length=79]
- repo: https://github.com/asottile/pyupgrade
rev: v2.29.0
hooks:
- id: pyupgrade
args: [--py36-plus]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.720
rev: v0.910
hooks:
- id: mypy
exclude: ^(docs/|example-plugin/|tests/fixtures)
exclude: ^(docs/|example-plugin/)
37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

12 changes: 10 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
.. image:: https://github.com/PyCQA/flake8/workflows/main/badge.svg
:target: https://github.com/PyCQA/flake8/actions?query=workflow%3Amain
:alt: build status

.. image:: https://results.pre-commit.ci/badge/github/PyCQA/flake8/main.svg
:target: https://results.pre-commit.ci/latest/github/PyCQA/flake8/main
:alt: pre-commit.ci status

========
Flake8
========
@@ -55,10 +63,10 @@ Links

* `Flake8 Documentation <http://flake8.pycqa.org/en/latest/>`_

* `GitLab Project <https://gitlab.com/pycqa/flake8>`_
* `GitHub Project <https://github.com/pycqa/flake8>`_

* `All (Open and Closed) Issues
<https://gitlab.com/pycqa/flake8/issues?scope=all&sort=updated_desc&state=all>`_
<https://github.com/pycqa/flake8/issues?q=is%3Aissue>`_

* `Code-Quality Archives
<https://mail.python.org/mailman/listinfo/code-quality>`_
4 changes: 2 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
codecov:
branch: master
branch: main
bot: null

coverage:
@@ -12,7 +12,7 @@ coverage:
default:
server: chat.freenode.net
channel: '##python-code-quality'
branches: master
branches: main
threshold: 2
message: null

Loading