0.10.0
What's Changed
Breaking changes
Release 0.10.0
of deptry brings a significant improvement to the way in which issues are reported. Previously, issues were reported in a summarized format, making it difficult for users to pinpoint exactly where in the code the issue was occurring. This is resolved by #357, which adds location information to the detected issues.
#367 adds error codes to identify the different issue types:
Code | Issue |
---|---|
DEP001 | Missing dependency |
DEP002 | Obsolete dependency |
DEP003 | Transitive dependency |
DEP004 | Misplaced development dependency |
Here's an example of how issues are now reported in release 0.10.0:
foo/bar.py:11:11: DEP002 'an_import' imported but missing from the dependencies
foo/bar.py:12:11: DEP002 'another_import' imported but missing from the dependencies
foo/baz.py:13:11: DEP003 'cfgv' imported but it is a transitive dependency
pyproject.toml: DEP001 'pandas' defined as a dependency but not used in the codebase
The json output generated by using the -o
or --json-output
is also modified to include the new error codes and location information:
{
"error": {
"code": "DEP001",
"message": "'seven' imported but missing from the dependency definitions"
},
"module": "seven",
"location": {
"file": "foo/bar.py",
"line": 2,
"column": 0
}
},
Features
- Add location to error reports by @mkniewallner in #357
- Add colours to text output by @mkniewallner in #368
Full Changelog: 0.9.0...0.10.0