Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add .direnv to default exclude argument #197

Merged
merged 3 commits into from
Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deptry/cli_defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"ignore_missing": (),
"ignore_transitive": (),
"ignore_misplaced_dev": (),
"exclude": ("venv", r"\.venv", "tests", r"\.git", "setup.py"),
"exclude": ("venv", r"\.venv", r"\.direnv", "tests", r"\.git", "setup.py"),
"extend_exclude": (),
"ignore_notebooks": False,
"skip_obsolete": False,
Expand Down
11 changes: 6 additions & 5 deletions deptry/result_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,17 @@ def _log_additional_info(self) -> None:
```
[tool.deptry]
ignore_obsolete = [
'foo'
"foo"
]
ignore_missing = [
'bar'
"bar"
]
ignore_transitive = [
'baz'
"baz"
]
exclude = [
'venv','.venv', 'tests', 'setup.py', 'docs'
extend_exclude = [
".*/foo/",
"bar/baz.py"
]
```

Expand Down
8 changes: 2 additions & 6 deletions docs/pyproject-toml.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,9 @@ An example of a configuration section for _deptry_ is given below.

```toml
[tool.deptry]
exclude = [
"venv",
".venv",
"tests",
"setup.py",
"docs",
extend_exclude = [
".*/foo/",
"bar/baz.py"
]
ignore_obsolete = [
"alpha",
Expand Down
4 changes: 2 additions & 2 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ _deptry_ can also be configured to look for `requirements.txt` files with other

To determine issues with imported modules and dependencies, _deptry_ will scan the working directory and its subdirectories recursively for `.py` and `.ipynb` files, so it can
extract the imported modules from those files. Any files solely used for development purposes, such as files used for unit testing, should not be scanned. By default, the directories
`venv`, `.venv`, `tests`,`.git` and the file `setup.py` are excluded.
`venv`, `.venv`, `.direnv`, `tests`,`.git` and the file `setup.py` are excluded.
fpgmaas marked this conversation as resolved.
Show resolved Hide resolved

To ignore other directories and files than the defaults, use the `--exclude` (or `-e`) flag. The argument can either be one long regular expression, or it can be reused multiple times to pass multiple smaller regular expressions. The paths should be specified as paths relative to the directory _deptry_ is running in, without the trailing `./`. An example:

Expand All @@ -57,7 +57,7 @@ deptry . -ee bar -ee ".*/foo/"
deptry . --extend-exclude "bar|.*/foo/"
```

This will exclude `venv`, `.venv`, `.git`, `tests`, `setup.py`, `bar`, and any directory named `foo`.
This will exclude `venv`, `.venv`, `.direnv`, `.git`, `tests`, `setup.py`, `bar`, and any directory named `foo`.

## Increased verbosity

Expand Down
36 changes: 18 additions & 18 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.