Files
lutris/ruff.toml
Daniel Johnson c28e8f3000 Enable RUF013 (no implicit Optional) lint rule
Fix the last implicit optional in moddb.py and remove RUF013 from
the ruff ignore list so it is enforced going forward.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-28 08:17:11 -04:00

34 lines
2.0 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
line-length = 120
[lint]
select = ["A", "ARG", "B", "E", "F", "I", "W", "PERF", "RUF"]
ignore = [
# Ignores that is not worth/too hard to fix
"RUF001", # String contains ambiguous `` (FULLWIDTH EXCLAMATION MARK). Did you mean `!` (EXCLAMATION MARK)? - used ,mostly on tests
"E402", # Module level import not at top of file - gtk stuff
# Ignores that should be fixed and removed
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"PERF401", # Use a list comprehension to create a transformed list
"RUF100", # [*] Unused `noqa` directive (non-enabled: `C901`) - unused pylint/noqa directives that should be removed
"PERF203", # `try`-`except` within a loop incurs performance overhead
"RUF015", # Prefer `next(...)` over single element slice - opinionated, but some cases could be changed
"PERF102",# When using only the values of a dict use the `values()` method
"RUF005", # Consider iterable unpacking instead of concatenation
"A003", # Class attribute `id` is shadowing a Python builtin
"B905", # `zip()` without an explicit `strict=` parameter
"ARG002", # Unused method argument: `mock_path_exists`
"E722", # Do not use bare `except`
"B904", # Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling
"B008", # Do not perform function call `_try_import_moddb_library` in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable
"ARG005", # Unused lambda argument: `e`
"ARG001", # Unused function argument: `args`
"PERF402", # Use `list` or `list.copy` to create a copy of a list
"A002", # Argument `type` is shadowing a Python builtin
"ARG004", # Unused static method argument: `x`
"B020", # Loop control variable `upstream_runners` overrides iterable it iterates
"B018", # Found useless expression. Either assign it to a variable or remove it
]
fixable = ["ALL"]
unfixable = []