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: 4.0.1
Choose a base ref
...
head repository: PyCQA/flake8
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5.0.0
Choose a head ref

Commits on Oct 11, 2021

  1. remove indent_size_str

    this was originally added only for pycodestyle which no longer uses it
    asottile committed Oct 11, 2021
    Copy the full SHA
    d666c40 View commit details
  2. update doc after #1404

    nim65s committed Oct 11, 2021
    Copy the full SHA
    ac2059d View commit details
  3. Copy the full SHA
    d835bc8 View commit details
  4. Merge pull request #1413 from nim65s/main

    remove user configuration in docs
    asottile authored Oct 11, 2021
    Copy the full SHA
    6f384b8 View commit details
  5. [pre-commit.ci] pre-commit autoupdate

    updates:
    - [github.com/pre-commit/mirrors-mypy: v0.910 → v0.910-1](pre-commit/mirrors-mypy@v0.910...v0.910-1)
    pre-commit-ci[bot] authored Oct 11, 2021
    Copy the full SHA
    8daf52a View commit details
  6. Merge pull request #1414 from PyCQA/pre-commit-ci-update-config

    [pre-commit.ci] pre-commit autoupdate
    asottile authored Oct 11, 2021
    Copy the full SHA
    2fee598 View commit details

Commits on Oct 12, 2021

  1. Merge pull request #1411 from PyCQA/indent-size-str

    remove indent_size_str
    asottile authored Oct 12, 2021
    Copy the full SHA
    ecee230 View commit details

Commits on Oct 18, 2021

  1. Copy the full SHA
    56dd10e View commit details
  2. Copy the full SHA
    d58af9f View commit details
  3. Copy the full SHA
    d83b74b View commit details
  4. Merge pull request #1427 from mxr/minor-typing-fixes

    Update type hint and expression for _multiprocessing_is_fork()
    asottile authored Oct 18, 2021
    Copy the full SHA
    4157cdb View commit details
  5. Fix tests

    mxr committed Oct 18, 2021
    Copy the full SHA
    dd6d61c View commit details
  6. Merge pull request #1426 from mxr/fix-return

    Remove usage of self.manager.map() in load_plugins()
    asottile authored Oct 18, 2021
    Copy the full SHA
    bcb88c4 View commit details

Commits on Nov 1, 2021

  1. [pre-commit.ci] pre-commit autoupdate

    updates:
    - [github.com/psf/black: 21.9b0 → 21.10b0](psf/black@21.9b0...21.10b0)
    pre-commit-ci[bot] authored Nov 1, 2021
    Copy the full SHA
    84b9831 View commit details
  2. Merge pull request #1436 from PyCQA/pre-commit-ci-update-config

    [pre-commit.ci] pre-commit autoupdate
    asottile authored Nov 1, 2021
    Copy the full SHA
    a4e337a View commit details

Commits on Nov 2, 2021

  1. Fix ReadTheDocs builds

    docutils 0.18 is busted and needs to be prevented from being installed
    
    Related to sphinx-doc/sphinx#9788
    
    Related to readthedocs/readthedocs.org#8616
    sigmavirus24 committed Nov 2, 2021
    Copy the full SHA
    221de71 View commit details
  2. Merge pull request #1437 from PyCQA/fix-rtfd

    Fix ReadTheDocs builds
    sigmavirus24 authored Nov 2, 2021
    Copy the full SHA
    05cae7e View commit details

Commits on Nov 6, 2021

  1. add --color option

    asottile committed Nov 6, 2021
    Copy the full SHA
    848003c View commit details
  2. Merge pull request #1440 from asottile/colors

    add --color option
    asottile authored Nov 6, 2021
    Copy the full SHA
    a08fc4b View commit details
  3. deprecate the --diff option

    asottile committed Nov 6, 2021
    Copy the full SHA
    e657923 View commit details
  4. Merge pull request #1441 from asottile/deprecate_diff

    deprecate the --diff option
    sigmavirus24 authored Nov 6, 2021
    Copy the full SHA
    e34647f View commit details

Commits on Nov 8, 2021

  1. Copy the full SHA
    1638145 View commit details
  2. Merge pull request #1443 from Spectre5/Add-nox-to-default-exclude-list

    Add .nox to default exclude list
    sigmavirus24 authored Nov 8, 2021
    Copy the full SHA
    382cc91 View commit details

Commits on Nov 14, 2021

  1. Copy the full SHA
    ef3585b View commit details
  2. Copy the full SHA
    7e5d650 View commit details
  3. delete unused codecov.yml

    asottile committed Nov 14, 2021
    Copy the full SHA
    5319cf9 View commit details
  4. Copy the full SHA
    ba8f093 View commit details
  5. Merge pull request #1448 from PyCQA/coverage-6

    require coverage 6.x and simplify config
    asottile authored Nov 14, 2021
    Copy the full SHA
    17a36ef View commit details
  6. Merge pull request #1450 from asottile/remove-codecov

    delete unused codecov.yml
    asottile authored Nov 14, 2021
    Copy the full SHA
    f1d8608 View commit details
  7. Merge pull request #1451 from asottile/remove-hg

    remove mercurial tags/ignore files
    asottile authored Nov 14, 2021
    Copy the full SHA
    074c004 View commit details
  8. Merge pull request #1449 from asottile/remove-polyfill

    remove mentions of flake8-polyfill
    asottile authored Nov 14, 2021
    Copy the full SHA
    002a99e View commit details
  9. Copy the full SHA
    5bed787 View commit details
  10. Merge pull request #1452 from asottile/type_init

    add typing to src/flake8/__init__.py
    asottile authored Nov 14, 2021
    Copy the full SHA
    c9cac99 View commit details
  11. remove dead code

    asottile committed Nov 14, 2021
    Copy the full SHA
    0c62569 View commit details
  12. Copy the full SHA
    b3c6364 View commit details
  13. Merge pull request #1453 from asottile/dead

    remove dead code
    asottile authored Nov 14, 2021
    Copy the full SHA
    799c71e View commit details
  14. Merge pull request #1454 from asottile/unused-example-code

    remove unused example-code test fixtures
    asottile authored Nov 14, 2021
    Copy the full SHA
    1782298 View commit details
  15. Copy the full SHA
    e527b8e View commit details
  16. Merge pull request #1455 from PyCQA/simplify-flake8-config

    simplify our own flake8 config
    asottile authored Nov 14, 2021
    Copy the full SHA
    e973a02 View commit details
  17. Copy the full SHA
    3af47b7 View commit details
  18. Merge pull request #1456 from asottile/unused-test-fixtures

    remove some unused test fixture files
    asottile authored Nov 14, 2021
    Copy the full SHA
    639dfe1 View commit details
  19. improve coverage a bit

    asottile committed Nov 14, 2021
    Copy the full SHA
    bb3c8d2 View commit details
  20. Merge pull request #1457 from asottile/improve_coverage

    improve coverage a bit
    asottile authored Nov 14, 2021
    Copy the full SHA
    b454674 View commit details
  21. Copy the full SHA
    0698366 View commit details
  22. Merge pull request #1459 from asottile/jobs-repr

    add a __repr__ for JobsArgument
    asottile authored Nov 14, 2021
    Copy the full SHA
    d582aff View commit details
  23. Copy the full SHA
    8d3afe4 View commit details
  24. Merge pull request #1460 from asottile/optmanager_parse_args

    use return value of parse_args directly
    asottile authored Nov 14, 2021
    Copy the full SHA
    5a85dd8 View commit details

Commits on Nov 15, 2021

  1. Copy the full SHA
    81a4110 View commit details
  2. Merge pull request #1461 from PyCQA/application_exit_code

    have application return exit code for easier testing
    asottile authored Nov 15, 2021
    Copy the full SHA
    5e2e503 View commit details
  3. Copy the full SHA
    97c3de4 View commit details
Showing with 4,117 additions and 4,847 deletions.
  1. +0 −7 .coveragerc
  2. +0 −33 .github/ISSUE_TEMPLATE.md
  3. +86 −0 .github/ISSUE_TEMPLATE/01_bug.yml
  4. +27 −0 .github/ISSUE_TEMPLATE/02_feature.yml
  5. +11 −0 .github/ISSUE_TEMPLATE/config.yml
  6. +0 −13 .hgignore
  7. +0 −31 .hgtags
  8. +13 −9 .pre-commit-config.yaml
  9. +1 −1 CONTRIBUTING.rst
  10. +10 −6 README.rst
  11. +96 −0 bin/gen-pycodestyle-plugin
  12. +0 −42 codecov.yml
  13. +11 −19 docs/source/conf.py
  14. +0 −1 docs/source/index.rst
  15. +0 −2 docs/source/internal/checker.rst
  16. +1 −1 docs/source/internal/contributing.rst
  17. +13 −37 docs/source/internal/option_handling.rst
  18. +11 −63 docs/source/internal/plugin_handling.rst
  19. +2 −2 docs/source/internal/releases.rst
  20. +0 −40 docs/source/internal/utils.rst
  21. +4 −36 docs/source/internal/writing-code.rst
  22. +0 −147 docs/source/manpage.rst
  23. +0 −187 docs/source/plugin-development/cross-compatibility.rst
  24. +0 −1 docs/source/plugin-development/index.rst
  25. +2 −2 docs/source/plugin-development/plugin-parameters.rst
  26. +1 −1 docs/source/release-notes/3.0.0.rst
  27. +76 −0 docs/source/release-notes/5.0.0.rst
  28. +6 −0 docs/source/release-notes/index.rst
  29. +2 −2 docs/source/requirements.txt
  30. +5 −32 docs/source/user/configuration.rst
  31. +0 −2 docs/source/user/error-codes.rst
  32. +2 −1 docs/source/user/invocation.rst
  33. +70 −7 docs/source/user/options.rst
  34. +0 −3 example-plugin/src/flake8_example_plugin/off_by_default.py
  35. +0 −3 example-plugin/src/flake8_example_plugin/on_by_default.py
  36. +2 −4 pytest.ini
  37. +9 −63 setup.cfg
  38. +10 −14 src/flake8/__init__.py
  39. +3 −2 src/flake8/__main__.py
  40. +122 −102 src/flake8/api/legacy.py
  41. +66 −132 src/flake8/checker.py
  42. +1 −2 src/flake8/defaults.py
  43. +96 −0 src/flake8/discover_files.py
  44. +19 −13 src/flake8/exceptions.py
  45. +59 −0 src/flake8/formatting/_windows_color.py
  46. +15 −23 src/flake8/formatting/base.py
  47. +21 −5 src/flake8/formatting/default.py
  48. +115 −150 src/flake8/main/application.py
  49. +4 −4 src/flake8/main/cli.py
  50. +15 −50 src/flake8/main/debug.py
  51. +72 −56 src/flake8/main/options.py
  52. +16 −47 src/flake8/options/aggregator.py
  53. +94 −287 src/flake8/options/config.py
  54. +85 −173 src/flake8/options/manager.py
  55. +363 −0 src/flake8/plugins/finder.py
  56. +0 −533 src/flake8/plugins/manager.py
  57. +123 −0 src/flake8/plugins/pycodestyle.py
  58. +17 −8 src/flake8/plugins/pyflakes.py
  59. +41 −0 src/flake8/plugins/reporter.py
  60. +24 −42 src/flake8/processor.py
  61. +12 −19 src/flake8/statistics.py
  62. +106 −253 src/flake8/style_guide.py
  63. +24 −128 src/flake8/utils.py
  64. +103 −0 src/flake8/violation.py
  65. +0 −42 tests/fixtures/config_files/README.rst
  66. +0 −9 tests/fixtures/config_files/broken.ini
  67. +0 −16 tests/fixtures/config_files/cli-specified-with-inline-comments.ini
  68. +0 −16 tests/fixtures/config_files/cli-specified-without-inline-comments.ini
  69. +0 −10 tests/fixtures/config_files/cli-specified.ini
  70. +0 −5 tests/fixtures/config_files/config-with-hyphenated-options.ini
  71. +0 −3 tests/fixtures/config_files/local-config.ini
  72. +0 −5 tests/fixtures/config_files/local-plugin-path.ini
  73. +0 −5 tests/fixtures/config_files/local-plugin.ini
  74. +0 −20 tests/fixtures/config_files/no-flake8-section.ini
  75. +0 −5 tests/fixtures/config_files/user-config.ini
  76. +0 −4 tests/fixtures/example-code/inline-ignores/E501.py
  77. +0 −1 tests/fixtures/example-code/inline-ignores/E731.py
  78. +0 −1 tests/fixtures/example-code/invalid-syntax.py
  79. 0 tests/{fixtures/example-code/empty.py → integration/__init__.py}
  80. 0 tests/integration/subdir/__init__.py
  81. +0 −3 tests/integration/subdir/aplugin.py
  82. +32 −29 tests/integration/test_aggregator.py
  83. +30 −47 tests/integration/test_checker.py
  84. +77 −27 tests/integration/test_main.py
  85. +157 −28 tests/integration/test_plugins.py
  86. 0 tests/unit/__init__.py
  87. +1 −1 tests/unit/conftest.py
  88. 0 tests/unit/plugins/__init__.py
  89. +851 −0 tests/unit/plugins/finder_test.py
  90. +33 −0 tests/unit/plugins/pycodestyle_test.py
  91. +74 −0 tests/unit/plugins/reporter_test.py
  92. +10 −74 tests/unit/test_application.py
  93. +52 −8 tests/unit/test_base_formatter.py
  94. +32 −24 tests/unit/test_checker_manager.py
  95. +0 −143 tests/unit/test_config_file_finder.py
  96. +0 −188 tests/unit/test_config_parser.py
  97. +37 −123 tests/unit/test_debug.py
  98. +86 −254 tests/unit/test_decision_engine.py
  99. +174 −0 tests/unit/test_discover_files.py
  100. +3 −2 tests/unit/test_exceptions.py
  101. +31 −15 tests/unit/test_file_checker.py
  102. +26 −71 tests/unit/test_file_processor.py
  103. +5 −6 tests/unit/test_filenameonly_formatter.py
  104. +0 −45 tests/unit/test_get_local_plugins.py
  105. +25 −37 tests/unit/test_legacy_api.py
  106. +17 −0 tests/unit/test_main_options.py
  107. +4 −3 tests/unit/test_nothing_formatter.py
  108. +0 −8 tests/unit/test_option.py
  109. +22 −118 tests/unit/test_option_manager.py
  110. +209 −0 tests/unit/test_options_config.py
  111. +0 −169 tests/unit/test_plugin.py
  112. +0 −57 tests/unit/test_plugin_manager.py
  113. +0 −210 tests/unit/test_plugin_type_manager.py
  114. +1 −1 tests/unit/test_pyflakes_codes.py
  115. +7 −9 tests/unit/test_statistics.py
  116. +1 −1 tests/unit/test_style_guide.py
  117. +22 −126 tests/unit/test_utils.py
  118. +6 −15 tests/unit/test_violation.py
  119. +5 −22 tox.ini
7 changes: 0 additions & 7 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[run]
parallel = True
branch = True
source =
flake8
@@ -8,12 +7,6 @@ omit =
# Don't complain if non-runnable code isn't run
*/__main__.py

[paths]
source =
src/flake8
.tox/*/lib/python*/site-packages/flake8
.tox/pypy/site-packages/flake8

[report]
show_missing = True
skip_covered = True
33 changes: 0 additions & 33 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

86 changes: 86 additions & 0 deletions .github/ISSUE_TEMPLATE/01_bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: bug report
description: something went wrong
body:
- type: markdown
attributes:
value: >
Please read this brief portion of documentation before going any
further:
https://flake8.pycqa.org/en/latest/internal/contributing.html#filing-a-bug
- type: markdown
attributes:
value: >
**NOTE: flake8 is a linting framework and does not implement any
checks**
- type: markdown
attributes:
value: >
_if you are reporting a problem with a particular check, please track
down the plugin which implements that check_
- type: textarea
id: install
attributes:
label: how did you install flake8?
description: 'note: this will be rendered as ```console automatically'
placeholder: |
$ pip install flake8 # or `brew install flake8` etc.
Collecting flake8
...
Successfully installed flake8...
render: console
validations:
required: true

- type: markdown
attributes:
value: >
**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.
- type: textarea
id: bug-report
attributes:
label: unmodified output of `flake8 --bug-report`
description: 'note: this will be rendered as ```json automatically'
placeholder: |
{
"platform": {
"...": "...
}
}
render: json
validations:
required: true

- type: textarea
id: freeform
attributes:
label: describe the problem
description: >
please provide **sample code** and **directions for reproducing
your problem** including the **commands you ran**, their
**unedited output**, and **what you expected to happen**
value: |
#### what I expected to happen
...
#### sample code
```python
print('hello world!')
```
#### commands ran
```console
$ flake8 t.py
...
```
validations:
required: true
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/02_feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: feature request
description: a new feature!
body:
- type: markdown
attributes:
value: >
Please read this brief portion of documentation before going any
further:
https://flake8.pycqa.org/en/latest/internal/contributing.html#filing-a-bug
- type: markdown
attributes:
value: '**NOTE: flake8 is a linting framework and does not implement any checks**'

- type: markdown
attributes:
value: '**NOTE: if you ask about `pyproject.toml` your issue will be closed as a duplicate of [#234](https://github.com/PyCQA/flake8/issues/234)**'

- type: textarea
id: freeform
attributes:
label: describe the request
description: >
please describe your use case and why the current feature set does
not satisfy your needs
validations:
required: true
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: problem with E___ or W___ codes
url: https://github.com/PyCQA/pycodestyle/issues
about: flake8 does not implement any checks, perhaps you want pycodestyle?
- name: problem with F___ codes
url: https://github.com/PyCQA/pyflakes/issues
about: flake8 does not implement any checks, perhaps you want pyflakes?
- name: problem with C___ codes
url: https://github.com/PyCQA/mccabe/issues
about: flake8 does not implement any checks, perhaps you want mccabe?
13 changes: 0 additions & 13 deletions .hgignore

This file was deleted.

31 changes: 0 additions & 31 deletions .hgtags

This file was deleted.

22 changes: 13 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
exclude: ^tests/fixtures/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.3.0
hooks:
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: ^tests/fixtures/
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.6.0
rev: v3.8.2
hooks:
- id: reorder-python-imports
args: [--application-directories, '.:src', --py36-plus]
- repo: https://github.com/asottile/pyupgrade
rev: v2.37.2
hooks:
- id: pyupgrade
args: [--py36-plus]
- repo: https://github.com/psf/black
rev: 21.9b0
rev: 22.6.0
hooks:
- id: black
args: [--line-length=79]
- repo: https://github.com/asottile/pyupgrade
rev: v2.29.0
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: pyupgrade
args: [--py36-plus]
- id: flake8
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.910
rev: v0.971
hooks:
- id: mypy
exclude: ^(docs/|example-plugin/)
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Please refer to `Contributing to Flake8
<http://flake8.pycqa.org/en/latest/internal/contributing.html>`_
<https://flake8.pycqa.org/en/latest/internal/contributing.html>`_
on our website.
16 changes: 10 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
@@ -6,6 +6,10 @@
:target: https://results.pre-commit.ci/latest/github/PyCQA/flake8/main
:alt: pre-commit.ci status

.. image:: https://img.shields.io/discord/825463413634891776.svg
:target: https://discord.gg/qYxpadCgkx
:alt: Discord

========
Flake8
========
@@ -37,14 +41,14 @@ Quickstart
==========

See our `quickstart documentation
<http://flake8.pycqa.org/en/latest/index.html#quickstart>`_ for how to install
<https://flake8.pycqa.org/en/latest/index.html#quickstart>`_ for how to install
and get started with Flake8.


Frequently Asked Questions
==========================

Flake8 maintains an `FAQ <http://flake8.pycqa.org/en/latest/faq.html>`_ in its
Flake8 maintains an `FAQ <https://flake8.pycqa.org/en/latest/faq.html>`_ in its
documentation.


@@ -61,7 +65,7 @@ to suggest, the mailing list would be the best place for it.
Links
=====

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

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

@@ -72,14 +76,14 @@ Links
<https://mail.python.org/mailman/listinfo/code-quality>`_

* `Code of Conduct
<http://flake8.pycqa.org/en/latest/internal/contributing.html#code-of-conduct>`_
<https://flake8.pycqa.org/en/latest/internal/contributing.html#code-of-conduct>`_

* `Getting Started Contributing
<http://flake8.pycqa.org/en/latest/internal/contributing.html>`_
<https://flake8.pycqa.org/en/latest/internal/contributing.html>`_


Maintenance
===========

Flake8 was created by Tarek Ziadé and is currently maintained by `Ian Cordasco
<http://www.coglib.com/~icordasc/>`_
<https://www.coglib.com/~icordasc/>`_
Loading