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

Parity Reference #1593

Closed
danieleades opened this issue Jan 3, 2023 · 6 comments · Fixed by #1639
Closed

Parity Reference #1593

danieleades opened this issue Jan 3, 2023 · 6 comments · Fixed by #1639
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@danieleades
Copy link

The readme is pretty comprehensive in showing the supported lints, in relation to their corresponding flake8-plugins. I'm more interested in the inverse.

That is, I have a codebase that makes extensive use of flake8 plugins for linting. I would like a reference of which plugins can be completely replaced by ruff so that I can incrementally remove them where they overlap.

Is there some way to parse this?

For example, under the readme section for flake8-bugbear I see a list of all of the bugbear lints supported by Ruff. Short of manually cross-referencing against the bugbear docs, is there some way for me to check whether i can remove the bugbear plugin entirely by using ruff?

@danieleades
Copy link
Author

Another example- when replacing isort with ruff (at least in my repo) the package isn't automatically detected by ruff as a 'known first party' module, so this config needs to be added

@bluetech
Copy link
Contributor

bluetech commented Jan 3, 2023

For me https://github.com/charliermarsh/ruff#how-does-ruff-compare-to-flake8 answered this question -- the ones with X/Y are incomplete, the rest are complete.

@danieleades
Copy link
Author

For me https://github.com/charliermarsh/ruff#how-does-ruff-compare-to-flake8 answered this question -- the ones with X/Y are incomplete, the rest are complete.

it comes close, though if we confine the dicussion only to the examples i give above-

  • ruff doesn't implement all of bugbear's 'opinionated' lints
  • the fact that isort infers the root package and ruff does not is not documented

@charliermarsh charliermarsh added the documentation Improvements or additions to documentation label Jan 3, 2023
@charliermarsh
Copy link
Member

Thanks @danieleades. I'll add a section to note a few of those incompatibilities.

@charliermarsh charliermarsh self-assigned this Jan 4, 2023
@charliermarsh
Copy link
Member

Another example- when replacing isort with ruff (at least in my repo) the package isn't automatically detected by ruff as a 'known first party' module, so this config needs to be added

If you post your project structure, I'm happy to help with the configuration. Ruff typically can infer the root, unless you're using namespace packages.

@danieleades
Copy link
Author

Another example- when replacing isort with ruff (at least in my repo) the package isn't automatically detected by ruff as a 'known first party' module, so this config needs to be added

If you post your project structure, I'm happy to help with the configuration. Ruff typically can infer the root, unless you're using namespace packages.

Sure - dont think I'm doing anything particularly strange

https://github.com/danieleades/sphinx-graph

By the way, it only affected the 'tests' directory. Isort and ruff didn't agree on how to group the imports in tests/ unless ruff had the additional config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants