Conversation
pyproject.toml
Outdated
| lint.select = [ | ||
| "E", | ||
| "W", | ||
| "F", | ||
| "I", | ||
| "B", | ||
| "C4", | ||
| "ARG", | ||
| "SIM", | ||
| "PTH", | ||
| "PL", | ||
| "TID", | ||
| ] | ||
| lint.ignore = [ |
There was a problem hiding this comment.
How come you're not using this instead, for select and ignore?
[tool.ruff.lint]As seen (and suggested one might say) in ruff's docs.
pyproject.toml
Outdated
|
|
||
| [tool.ruff] | ||
| target-version = "py310" # oldest supported Python version | ||
| fix = true |
There was a problem hiding this comment.
Shouldn't fixes be opt-in, instead of opt-out? 🤔 Would you mind elaborating on your reasoning?
There was a problem hiding this comment.
oops, that should be opt-in, sorry.
pyproject.toml
Outdated
| "W291", # Trailing whitespace | ||
| "E501", # Line too long | ||
| "W293", # Blank line contains whitespace | ||
| "PLR0912", # Too many branches | ||
| "PLR2004", # Magic values | ||
| "PLR0915", # Too many statements | ||
| "PLW0603", # Global statement | ||
| "PLR0913", # Too many arguments | ||
| "B010", # setattr | ||
| "F401", # unused imports | ||
| "ARG002", # unused arguments | ||
| "SIM105", # try-except-pass |
There was a problem hiding this comment.
Are you ignoring them because there are many fixes to be made?
If so, the suggested approach is not to ignore them at the configuration level, but run ruff with --add-noqa, as seen here.
When enabling a new rule on an existing codebase, you may want to ignore all existing violations of that rule and instead focus on enforcing it going forward.
There was a problem hiding this comment.
Ah, never know that kind of thing, thanks!
| [tool.ruff.format] | ||
| quote-style = "single" | ||
|
|
||
| [tool.pyright] |
There was a problem hiding this comment.
You are adding a pyright configuration but pyright is not in the repo in any capacity.
There was a problem hiding this comment.
will add pyright soon in another PR
|
Thanks @DinhHuy2010 for the contribution. And thanks @Tsafaras for the review, I agree with the comments. Regarding select/ignore, it should be more specific. I've pushed a commit where just the F401, F403 and F405 rules are ignored, and only in the concerned files Now @DinhHuy2010 Could you open other PRs with work from PR #1332 ? |
|
hi, sorry for waiting and yes @Tsafaras, I forgot to change to new style (and also did not know about the Alright, Let me fix the changes. Thanks. |
Split from #1332