Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compat with flake8 >= 6 #269

Closed
g-as opened this issue Nov 24, 2022 · 10 comments
Closed

Compat with flake8 >= 6 #269

g-as opened this issue Nov 24, 2022 · 10 comments

Comments

@g-as
Copy link
Contributor

g-as commented Nov 24, 2022

Notably, flake8 bumped min python version to 3.8.1

https://flake8.pycqa.org/en/latest/release-notes/6.0.0.html

I can draft a PR based on what you want to do, either:

  • minimal changes increasing flake8's upper bound
  • big changes with a 2.0, aligning with flake8 in supporting >= 3.8.1, 3.11 support
@sobolevn
Copy link
Member

See wemake-services/flake8-broken-line#280

@janmayer
Copy link

Could you just drop the upper bond? We see that the flake8 team release major versions quite regularly - without these versions requiring any change to the extensions.

This is the only flake8 extensions we use that breaks the build every time on a flake8 major version bump.

@osherdp
Copy link

osherdp commented Nov 29, 2022

For us as well (only this plugin has an upper-bound version restriction):

The conflict is caused by:
    The user requested flake8==6.0.0
    flake8-bugbear 22.10.27 depends on flake8>=3.0.0
    flake8-formatter-junit-xml 0.0.6 depends on flake8>3.0.0
    flake8-colors 0.1.9 depends on flake8>3.0.0
    flake8-eradicate 1.4.0 depends on flake8<6 and >=3.5

@zerocewl
Copy link

yep, same here:

    The conflict is caused by:
        The user requested flake8 6.0.0 (from /builds/...)
        flake8-annotations-complexity 0.0.7 depends on flake8
        flake8-bugbear 22.9.23 depends on flake8>=3.0.0
        flake8-builtins 1.5.3 depends on flake8
        flake8-docstrings 1.6.0 depends on flake8>=3
        flake8-eradicate 1.4.0 depends on flake8<6 and >=3.5

@zerocewl
Copy link

zerocewl commented Dec 4, 2022

see changes from @danyeaw #271

@tekdj7
Copy link

tekdj7 commented Jan 4, 2023

@sobolevn @mkniewallner this plug-in is very helpful ensuring comments aren't left behind when code goes to production. Any update on when this can be fixed so eradicate can work with flake8 6+?

@mkniewallner
Copy link
Contributor

@sobolevn @mkniewallner this plug-in is very helpful ensuring comments aren't left behind when code goes to production. Any update on when this can be fixed so eradicate can work with flake8 6+?

I am not a maintainer of this repository, please don't ping me.

@zerocewl
Copy link

@sobolevn
Is this repo still maintained?
otherwise we might create a simple clone for the needed updates?

@Victoremepunto
Copy link

bump

jheddings added a commit to jheddings/wxdat that referenced this issue Feb 1, 2023
jheddings added a commit to jheddings/pingdat that referenced this issue Feb 1, 2023
jheddings pushed a commit to jheddings/wxdat that referenced this issue Feb 1, 2023
* Removed eradicate due to wemake-services/flake8-eradicate#269
* Added YAML linter
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: jheddings <[email protected]>
jheddings pushed a commit to jheddings/pingdat that referenced this issue Feb 1, 2023
* Removed eradicate due to wemake-services/flake8-eradicate#269
* Added YAML linter
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: jheddings <[email protected]>
jheddings added a commit to jheddings/juliet that referenced this issue Feb 1, 2023
jheddings added a commit to jheddings/notes2notion that referenced this issue Feb 1, 2023
jheddings pushed a commit to jheddings/notes2notion that referenced this issue Feb 1, 2023
* Removed eradicate due to wemake-services/flake8-eradicate#269
* Added YAML lint checks
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: jheddings <[email protected]>
jheddings pushed a commit to jheddings/juliet that referenced this issue Feb 1, 2023
* Removed eradicate due to wemake-services/flake8-eradicate#269
* Added YAML lint checks
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: jheddings <[email protected]>
jheddings added a commit to jheddings/notional that referenced this issue Feb 1, 2023
jheddings pushed a commit to jheddings/notional that referenced this issue Feb 1, 2023
* Removed eradicate due to wemake-services/flake8-eradicate#269
* YAML lint fixes
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: jheddings <[email protected]>
hoefling added a commit to hoefling/devpi-client-extensions that referenced this issue Mar 19, 2023
…8 configuration to pyproject.toml

Signed-off-by: oleg.hoefling <[email protected]>
hoefling added a commit to hoefling/devpi-client-extensions that referenced this issue Mar 19, 2023
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 22.10.0 → 23.1.0](psf/black@22.10.0...23.1.0)
- [github.com/pre-commit/pre-commit-hooks: v4.3.0 → v4.4.0](pre-commit/pre-commit-hooks@v4.3.0...v4.4.0)
- [github.com/PyCQA/flake8: 5.0.4 → 6.0.0](PyCQA/flake8@5.0.4...6.0.0)
- [github.com/PyCQA/isort: 5.10.1 → 5.12.0](PyCQA/isort@5.10.1...5.12.0)
- [github.com/PyCQA/bandit: 1.7.4 → 1.7.5](PyCQA/bandit@1.7.4...1.7.5)
- [github.com/pre-commit/mirrors-mypy: v0.990 → v1.1.1](pre-commit/mirrors-mypy@v0.990...v1.1.1)
- [github.com/hoefling/pre-commit-pytype: 2022.11.10 → 2023.2.14](hoefling/pre-commit-pytype@2022.11.10...2023.2.14)
- [github.com/PyCQA/doc8: v1.0.0 → v1.1.1](PyCQA/doc8@v1.0.0...v1.1.1)
- [github.com/pre-commit/pygrep-hooks: v1.9.0 → v1.10.0](pre-commit/pygrep-hooks@v1.9.0...v1.10.0)

* work around wemake-services/flake8-eradicate#269, move flake8 and doc8 configuration to pyproject.toml

Signed-off-by: oleg.hoefling <[email protected]>

* skip pytype hook in pre-commit ci

Signed-off-by: oleg.hoefling <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: oleg.hoefling <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: oleg.hoefling <[email protected]>
@hoefling
Copy link

Just as a small heads-up, I replaced flake8-eradicate and a bunch of other plugins with ruff, which is also a lot faster than running flake8. The replacement in config is simply turning the "ERA" rules group on in pyproject.toml:

[tool.ruff]
select = ["ERA", ...]

The minimal addition to .pre-commit-config.yaml is

repos:
-   repo: https://github.com/charliermarsh/ruff-pre-commit
    rev: v0.0.257
    hooks:
    -   id: ruff
        args: [--fix, --exit-non-zero-on-fix]

I didn't drop flake8 completely yet, with both tools running alongside for now, but the more I use ruff, the less I want to look back TBH.

nijel added a commit to gammu/website that referenced this issue Mar 22, 2023
Dealing with non-upgradable flake8 because of plugins is annoying.

See wemake-services/flake8-eradicate#269
@g-as g-as closed this as completed Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants