Skip to content

Do not traverse into hidden directories - #398

Merged
weibullguy merged 1 commit into
PyCQA:masterfrom
andymkr:skip-hidden-dirs
Oct 26, 2026
Merged

weibullguy merged 1 commit into
PyCQA:masterfrom
andymkr:skip-hidden-dirs

Conversation

@andymkr

@andymkr andymkr commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Prevents docformatter from traversing into hidden directories that weren't explicitly excluded.

Previously, in recursive mode docformatter would go into hidden directories, and drill into them recursively, unless they were explicitly excluded. That caused performance penalty and potentially automatic application of changes inside hidden directories that weren't also explicitly excluded (.git, .venv, etc.).

Steps to reproduce original issue fixed by this commit:

  1. Pull this branch
  2. Comment out newly added code in src/docformatter/utils.py
  3. Run the new test: poetry run pytest tests/test_utility_functions.py::test_find_py_files_skips_hidden_directory_recursive
  4. See it fail and items that were not supposed to get included, get included

@andymkr andymkr changed the title Do not walk into hidden directories in find_py_files() Do not traverse into hidden directories Oct 19, 2026
This commit prevents docformatter from traversing into hidden directories that weren't explicitly excluded
@weibullguy
weibullguy merged commit 393ab3d into PyCQA:master Oct 26, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants