Logo
Explore Help
Register Sign In
TeamHepta/mbedtls
1
0
Fork 0
You've already forked mbedtls
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2026-03-21 11:41:10 +01:00
Code Issues Packages Projects Releases Wiki Activity
Files
1d046fa0ddb609c698cf94de4477188745df5629
mbedtls/scripts/mbedtls_dev/__init__.py

4 lines
146 B
Python
Raw Normal View History

Use relative imports when importing other modules in the same directory We were using absolute imports under the assumption that the /scripts directory is in the path. This worked in normal use because every one of our Python scripts either were in the /scripts directory, or added the /scripts directory to the module search path in order to reference mbedtls_dev. However, this broke things like ``` python3 -m unittest scripts/mbedtls_dev/psa_storage.py ``` Fix this by using relative imports. Relative imports are only supposed to be used inside a package (Python doesn't complain, but Pylint does). So make /scripts/mbedtls_dev a proper package by creating __init__.py. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-09-16 22:35:18 +02:00
# This file needs to exist to make mbedtls_dev a package.
# Among other things, this allows modules in this directory to make
Documentation typo Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-09-29 18:48:41 +02:00
# relative imports.
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.3 Page: 23ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API