Comments (3)
You can globally remove the dependency on the command line by adding -x some_module
or you can add it to a .pydeps
file at the root of your project (check pydeps' own .pydeps
file for syntax: https://github.com/thebjorn/pydeps/blob/master/.pydeps).
There is currently no way to only ignore some_module
, but only for filename foo.py
.
You can export the dependency graph as json with the --show-deps
flag (it's a very simple format and it should be much easier to work with than removing/adding types to the source files), but there is unfortunately not a way to give a json dependency graph to pydeps for display..
from pydeps.
@thebjorn I think in cases where the imports under if TYPE_CHECKING
are of the same package that we are trying to check, excluding it doesn't work. Is there any way to have pydeps not take into account imports under if TYPE_CHECKING
?
from pydeps.
@skroth pydeps (and Python's modulefinder) doesn't do any semantic analysis, i.e. it only scans the .pyc files for opcodes related to imports, so unfortunately there is no way to check if-opcodes when they are generated(*).
(*) in Python I'm only aware of one case where the if is eliminated by the optimizer, and that is if <boolean-constant>:
. This is py3+ only, since True
and False
became real constants in the language. Maybe that can solve your question (see https://discuss.python.org/t/moving-type-checking-out-of-typing-and-into-the-built-in-namespace/7870)
from pydeps.
Related Issues (20)
- 1.12.10: test suite is installed HOT 6
- ValueError: bad marshal data (unknown type code) HOT 18
- feature: exclude externals deps HOT 2
- Pydeps: Support compiled python filename HOT 2
- [Problem already solved, you can close this]
- The cycles display mode shows useless information and does not work properly for larger projects. HOT 6
- [Feature Request] Specify module name instead of filename HOT 4
- Resolving relative dependencies? HOT 7
- Support for namespace packages HOT 1
- use of `--externals` results in TypeError: 'Config' object does not support item assignment HOT 1
- --dot-output option is not effective HOT 1
- Support output markdown mermaid HOT 1
- empty result with WARNING: SKIPPING ILLEGAL MODULE_NAME: D:.test.a HOT 2
- Support for specifying more than one `fname`
- 1.12.19: pitest fails in `tests/test_package_names.py::test_find_package_names` unit HOT 2
- `--exclude` option not working HOT 1
- Show only top-level imports HOT 1
- Exclude/include dependencies by filepath HOT 1
- Add type hints HOT 1
- Use of pydeps in CI to reject introduction of new import cycles? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pydeps.