Lightning-AI / Lightning-AI/lightning-thunder

Reduce `tool.ruff.lint.ignore`

Open
#2,218 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

code health developer efficiency good first issue help wanted
Dominant language
Python
Stars
1.5k
Forks
121
PR merge metrics
No merged PRs in 30d

Description

ae51153db2e623e8b9fb3609de3a6ad976addd0a enabled ruff-check in pre-commit.
I added a bunch of rules to "ignore" list but I think there are too many "ignore"s:
https://github.com/Lightning-AI/lightning-thunder/blob/ae51153db2e623e8b9fb3609de3a6ad976addd0a/pyproject.toml#L153-L176.

- [ ] "E731", # Do not assign a lambda expression, use a def
- [ ] "E501", # todo: Line too long (235 > 120 characters
- [ ] "F841", # https://docs.astral.sh/ruff/rules/unused-variable/
- [ ] "F821", # https://docs.astral.sh/ruff/rules/undefined-name/
- [ ] "E402", # https://docs.astral.sh/ruff/rules/module-import-not-at-top-of-file/
- [ ] "F401", # https://docs.astral.sh/ruff/rules/unused-import/
- [ ] "F405", # https://docs.astral.sh/ruff/rules/undefined-local-with-import-star-usage/
- [ ] "E712", # https://docs.astral.sh/ruff/rules/true-false-comparison/
- [ ] "E711", # https://docs.astral.sh/ruff/rules/none-comparison/
- [ ] "E721", # https://docs.astral.sh/ruff/rules/type-comparison/
- [ ] "E722", # https://docs.astral.sh/ruff/rules/bare-except/
- [ ] "F403", # https://docs.astral.sh/ruff/rules/undefined-local-with-import-star/
- [ ] "F601", # https://docs.astral.sh/ruff/rules/multi-value-repeated-key-literal/
- [ ] "F822", # https://docs.astral.sh/ruff/rules/undefined-export/
- [ ] "F842", # https://docs.astral.sh/ruff/rules/unused-annotation/
- [x] "F722", # https://docs.astral.sh/ruff/rules/forward-annotation-syntax-error/
- [x] "E702", # https://docs.astral.sh/ruff/rules/multiple-statements-on-one-line-semicolon/
- [ ] "E741", # https://docs.astral.sh/ruff/rules/ambiguous-variable-name/
- [x] "W293", # https://docs.astral.sh/ruff/rules/blank-line-with-whitespace/
- [ ] "F811", # https://docs.astral.sh/ruff/rules/redefined-while-unused/
- [x] "W291", # https://docs.astral.sh/ruff/rules/trailing-whitespace/

cc @borda @mruberry

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with pyproject.toml lines 153-176 and the commit that enabled ruff-check in pre-commit. Review each unchecked rule in the ignore list, locate its current violations, and determine whether the code or configuration should change. Done means the selected ignores are removed and the pre-commit ruff check passes without introducing those violations.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.