Expand ruff linter rules
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start with ruff.toml and the open-rule checklist, then run ruff check on sdk/basyx as described. Apply safe fixes where possible, run mypy and the tests after each rule or module, and expand to other modules only when the code remains passing; done means the selected rules are enabled or explicitly evaluated and the checks pass.
Written by the indexing model from the issue text.
Description
Current ruff linter configuration applies a certain set of rules. However more rules were already selected to be introduced at some point. These currently live in the ignore section and should be moved up to the select section.
The first introduction of these rules comes with some manual work to first get the codebase to the rules' standards.
A good way to add a rule is to introduce it step by step, e.g.:
- Run
ruff checkonly againstsdk/basyx - If possible, apply fixes with
ruff check --fix(or even unsafe-fixes) - Run tests (
mypytends to surface errors) to see if fixes are breaking - Only then expand to tests, repeat for other modules
Checklist (also see ruff.toml) of open rules:
PYI currently requires an additional dependency; after the introduction of a newer python version this can easily be introduced (see #594)
-
"PYI", # typing best practices
Might need more work to add:
-
"F403", # star imports - high existing usage -
"F405", # may-be-undefined from star imports -
"N818", # Exception name should be named with Error suffix -
"N", # pep8-naming -
"B", # flake8-bugbear -
"T20", # prevent native print() statements -
"A", # prevent shadowing of python builtins -
"FIX", # prevent the creation of T0DO / F1XME comments
Should be evaluated if we even want to add them:
-
"S", # security related precautions -
"BLE", # prevent unspecified excepts
- Dominant language
- Python
- Stars
- 102
- Forks
- 52
- Avg merge
- 20d 17h
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from eclipse-basyx/basyx-python-sdk
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
eclipse-basyx/basyx-python-sdk#634 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
All issues in eclipse-basyx/basyx-python-sdk
Similar issues
-
area: harness bug status: needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Human-Agent-Society/reef#625 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100
learningequality/kolibri#15351 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Name consistency Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
eellak/triplestore#65 · 1 comment ·