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

Replace flake8 with ruff #475

Closed
jsstevenson opened this issue Jul 29, 2023 · 6 comments · Fixed by #474
Closed

Replace flake8 with ruff #475

jsstevenson opened this issue Jul 29, 2023 · 6 comments · Fixed by #474
Assignees
Labels
cleanup Changes only making code cleaner & do not change how the code works nor the outputs produced priority:medium Medium priority

Comments

@jsstevenson
Copy link
Member

jsstevenson commented Jul 29, 2023

Side note: this repo is getting pretty big -- that would make it a good candidate for Ruff imo. Not sure how flake8/etc checks feel in others' editors but flake8 alone is taking me almost 5 seconds to cover variation/ and tests/ whereas Ruff is almost instant.

@jsstevenson jsstevenson added priority:medium Medium priority ci/cd Continuous integration and continuous delivery/deployment changes labels Jul 29, 2023
@jsstevenson
Copy link
Member Author

...and, as I keep reading, it looks like this should be addressed in #474

@korikuzma
Copy link
Member

I added it in #474 but it wasn’t getting everything. I was wondering why sometimes flake8 (both GH actions and local) wouldn’t catch missing docstrings. Flake8 passed locally on my machine, so I’ll switch to ruff in #474.

@korikuzma korikuzma changed the title Add style checks to GitHub Actions Replace flake8 with ruff Jul 29, 2023
@korikuzma korikuzma added cleanup Changes only making code cleaner & do not change how the code works nor the outputs produced and removed ci/cd Continuous integration and continuous delivery/deployment changes labels Jul 29, 2023
@korikuzma
Copy link
Member

The annotation warnings we ignore in flake8. It looks like we do this in therapy but not disease/gene

@korikuzma korikuzma self-assigned this Jul 29, 2023
@korikuzma
Copy link
Member

@jsstevenson this is what i have in my ruff.toml. Let me know if I should modify

select = ["E", "W", "F", "ANN", "Q", "D"]

line-length = 88

ignore = ["D205", "D400", "D415", "ANN101"]

[flake8-quotes]
inline-quotes = "double"

[per-file-ignores]
"tests/*" = ["ANN001", "ANN2", "ANN102"]
"setup.py" = ["F821"]
"*__init__.py" = ["F401"]

@korikuzma korikuzma linked a pull request Jul 29, 2023 that will close this issue
@jsstevenson
Copy link
Member Author

👍 my vote would also be to ignore ANN003 (https://beta.ruff.rs/docs/rules/missing-type-kwargs/)

@github-actions
Copy link

Closed by #494.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Changes only making code cleaner & do not change how the code works nor the outputs produced priority:medium Medium priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants