You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the relative imports in test directories fails with multiple tests/ directories, because a single init.py declares it as a regular namespace vs a package namespace:
Removing the init.py is the correct approach, as this makes the directory a namespace package, implicitly. However, pylint doesn't support namespace packages and relative imports:
put the workaround in all init.py in tests directories, which will ensure the workaround works regardless of which tests directory is found on the path first.
Or
once the pylint bug is fixed, removing the init.py from all test files, which is the best practice as of PEP 420.
The text was updated successfully, but these errors were encountered:
the relative imports in test directories fails with multiple tests/ directories, because a single init.py declares it as a regular namespace vs a package namespace:
https://packaging.python.org/guides/packaging-namespace-packages/#packaging-namespace-packages
Removing the init.py is the correct approach, as this makes the directory a namespace package, implicitly. However, pylint doesn't support namespace packages and relative imports:
pylint-dev/pylint#3609
For now I'm adding a workaround as stated here:
https://github.com/open-telemetry/opentelemetry-python/pull/727/files#diff-82f1c01233a504767e8c3f22a70b5940R22
But long term, we should either
Or
The text was updated successfully, but these errors were encountered: