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

Fix lint warnings, Add some lint rulesets #257

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

jku
Copy link
Member

@jku jku commented Jan 22, 2025

Main goal here is to silence this warning:

warning: The following rules have been removed and ignoring them has no effect:
    - ANN101
    - ANN102

This meant just removing them from lint.ignore list.

While I was looking at the lint config, I did add a few lint rulesets that I use elsewhere too (see https://docs.astral.sh/ruff/rules/ for details) . This meant a few minor code tweaks.

* Remove lint rules from ignore: these are now ignored by default
* Add new rulesets to lint (DTZ, FA, PIE, RET, SIM):
  See https://docs.astral.sh/ruff/rules/ for details
* Fix minor issues found by the rulesets
  * datetime.now() is deprecated
  * start argument in range() calls is not required
  * elif not required after return
  * pass not required

Signed-off-by: Jussi Kukkonen <[email protected]>
@jku jku requested a review from loosebazooka January 22, 2025 12:05
@jku jku merged commit d0e36ec into theupdateframework:main Jan 22, 2025
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants