top: Enable ruff linter check for F821 undefined-name.

Very helpful for catching typos or missing imports when writing code!

Description can be found at
https://beta.ruff.rs/docs/rules/undefined-name/

Parent commits contain various small fixes and inline ignores for this
check.  The only blanket exception is manifest files, which are numerous
and evaluated with some global names pre-defined - these can be globally
ignored.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
pull/12197/head
Angus Gratton 2023-08-09 18:24:29 +10:00 zatwierdzone przez Damien George
rodzic 1a5c9b9da4
commit 40fcbe1246
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -35,7 +35,6 @@ ignore = [
"F401",
"F403",
"F405",
"F821",
"PLC1901",
]
line-length = 337
@ -46,3 +45,7 @@ max-complexity = 40
[tool.ruff.per-file-ignores]
"ports/cc3200/tools/uniflash.py" = ["E711"]
# manifest.py files are evaluated with some global names pre-defined
"**/manifest.py" = ["F821"]
"ports/**/boards/manifest*.py" = ["F821"]