From 5b6fb2bc565315a0ce3470bf6b4bdbcd70b0df7a Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Wed, 9 Aug 2023 18:55:48 +1000 Subject: [PATCH] top: Enable Ruff linter to check undefined-name (F821). Also adds some global ignores for manifest files (which have implicit imports) and the multitests (which have the same). Other F821 fixes or accommodations are in the parent commits to this commit. Signed-off-by: Angus Gratton --- pyproject.toml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6828563c..1aa9c112 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,6 @@ ignore = [ "F403", "F405", "F541", - "F821", "F841", "ISC003", # micropython does not support implicit concatenation of f-strings "PIE810", # micropython does not support passing tuples to .startswith or .endswith @@ -91,3 +90,10 @@ max-statements = 166 [tool.ruff.per-file-ignores] "micropython/aiorepl/aiorepl.py" = ["PGH001"] + +# manifest.py files are evaluated with some global names pre-defined +"**/manifest.py" = ["F821"] +"ports/**/boards/manifest*.py" = ["F821"] + +# ble multitests are evaluated with some names pre-defined +"micropython/bluetooth/aioble/multitests/*" = ["F821"]