From 40fcbe1246e95eea33a727b1c6f22f76abb34d95 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Wed, 9 Aug 2023 18:24:29 +1000 Subject: [PATCH] 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 --- pyproject.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index dfd26bd8c9..a05abf887e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"]