diff options
author | Angus Gratton <angus@redyak.com.au> | 2023-08-09 18:14:33 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2023-08-16 16:12:33 +1000 |
commit | 861fbf6ab5bb0c2a21a04a312453bb7adb92b8be (patch) | |
tree | 4ffea27e65f9a78c42bc04e6341892fcb91c6587 /examples/natmod/btree/btree_py.py | |
parent | 00855eeb36acaf626f153d8c1850ca75744b1c55 (diff) | |
download | micropython-861fbf6ab5bb0c2a21a04a312453bb7adb92b8be.tar.gz micropython-861fbf6ab5bb0c2a21a04a312453bb7adb92b8be.zip |
examples: Mark asm, pio, etc. as noqa: F821 (undefined-name).
These files all use decorators (@asm_thumb, @asm_pio) that add names to the
function scope, that the linter cannot see.
It's useful to clear them in the file not in pyproject.toml as example code
will be copied and adapted elsewhere, and those developers may also use
Ruff (we hope!)
Signed-off-by: Angus Gratton <angus@redyak.com.au>
Diffstat (limited to 'examples/natmod/btree/btree_py.py')
-rw-r--r-- | examples/natmod/btree/btree_py.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/natmod/btree/btree_py.py b/examples/natmod/btree/btree_py.py index bd53c084a1..461b045c98 100644 --- a/examples/natmod/btree/btree_py.py +++ b/examples/natmod/btree/btree_py.py @@ -1,3 +1,7 @@ # Implemented in Python to support keyword arguments + +# ruff: noqa: F821 - this file is evaluated with C-defined names in scope + + def open(stream, *, flags=0, cachesize=0, pagesize=0, minkeypage=0): return _open(stream, flags, cachesize, pagesize, minkeypage) |