seddonym / import-linter

Import Linter allows you to define and enforce rules for the internal and external imports within your Python project.
https://import-linter.readthedocs.io/
BSD 2-Clause "Simplified" License
692 stars 49 forks source link

Forbidden import checking doesn't work correctly for descendants, when allow_indirect_imports=true #196

Closed seddonym closed 1 year ago

seddonym commented 1 year ago

Noticed by @qasimk. The contract will only check the source/forbidden modules, not their descendants.

This has been a bug since allow_indirect_imports was introduced, apologies for this.

seddonym commented 1 year ago

This fix is now available in version 1.12.0, enjoy!

QasimK commented 1 year ago

Thanks @seddonym :smile: