Commit 2c35ac2
committed
pyproject.toml: Make ruff aware of MicroPython builtins.
This commit updates the project-wide configuration for `ruff`, in order
to not let it flag usages of MicroPython-specific types and keywords
when performing code checks.
The tool currently has an exceptions list that covers almost all Python
code that ships with MicroPython, however code placed in
`ports/<port>/modules` (or elsewhere) by users for customisation
purposes will end up raising errors for otherwise valid
MicroPython-flavoured code.
Changes only let `ruff` assume that it knows about the existence of the
`micropython` module (used without an initial import) for decorators
(eg. `native`, `viper`, `asm_...`, etc.), Viper pointer types (`ptr`,
`ptr8`, `ptr16`, `ptr32`), and the `const` constructor.
For code that is placed elsewhere, these rules won't apply, so it might
be an option to add further configuration instruciton in the "getting
started" documentation files.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>1 parent 49fe174 commit 2c35ac2
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
0 commit comments