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
We often have the usecase where for a certain package we want to disallow imports of an external package foo.
Now to please tach check-external we would have to add all other packages to the dependencies which is cumbersome and requires frequent changes. Instead, we would like to explicitly model the forbidden external import of foo only.
The text was updated successfully, but these errors were encountered:
Hi @janbernloehr , thanks for raising this. Can you provide a few more details about your use case?
It sounds like you are maintaining multiple Python packages in your repo, are these built and released separately, or do they share an environment?
My assumption about listing dependencies for each package was that every external package would need to be listed there anyway, is this not the case? I might be misunderstanding the workaround you are describing.
Our usecase is that we have two packages foo and bar in our repo. We would like to prohibit foo from importing tensorflow and bar from importing torch. Instead of having a list of all external dependencies of foo we would rather just add tensorflow to the list of prohibited imports.
I also have this use case and would find it really valuable. In lieu of tach supporting it we might end up using import-linter or similar.
In our case, we want to limit the ability to import from eg sqlalchemy in anything except one of the modules in our codebase, so that all database access goes through a central place.
We often have the usecase where for a certain package we want to disallow imports of an external package
foo
.Now to please
tach check-external
we would have to add all other packages to the dependencies which is cumbersome and requires frequent changes. Instead, we would like to explicitly model the forbidden external import offoo
only.The text was updated successfully, but these errors were encountered: