Commit Graph

3 Commits

Author SHA1 Message Date
Gilles Peskine
419bacc049 Allow running pylint and mypy on a single file
Fix `mypy scripts/xxx.py`, `mypy tests/scripts/xxx.py`,
`pylint scripts/xxx.py`, `pylint tests/scripts/xxx.py`
failing to find `mbedtls_framework`.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-09-24 22:07:11 +02:00
Gilles Peskine
86fc21cd3b mypy: support mbedtls_dev.foo
Tell mypy to support packages without an __init__.py (PEP 420
namespace packages). Python 3.3 and (modern) Pylint support them out
of the box, but mypy needs to be told to support them.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2020-12-11 00:35:19 +01:00
Gilles Peskine
45d350b9dc Allow tests/scripts/foo.py to import from scripts
Allow Python scripts in tests/scripts to import modules located in the
scripts directory. To do this, use
```
import scripts_path # pylint: disable=unused-import
```

Declare the scripts directory to pylint and to mypy.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2020-12-10 23:16:03 +01:00