Skip to content

Support absolute paths in import completion skip list - #1060

Merged
sebastinas merged 1 commit into
bpython:mainfrom
Hugohong258:fix-absolute-completion-skip-paths
Oct 30, 2026
Merged

sebastinas merged 1 commit into
bpython:mainfrom
Hugohong258:fix-absolute-completion-skip-paths

Conversation

@Hugohong258

Copy link
Copy Markdown
Contributor

Fixes #968. Absolute entries in import_completion_skiplist currently never match because the scanner compares only the last path component. Match absolute patterns against the resolved path and its parents, while retaining name-pattern matching for relative entries. This lets a user skip a directory even when one of its descendants appears directly in the module search path.

The configuration documentation describes absolute paths and the existing limitation of colon-separated Windows drive-letter paths.

Validation:

  • Linux, CPython 3.14.4: pytest bpython/test/test_importcompletion.py -q (11 passed, 3 expected failures, 3 subtests passed).
  • Black 26.10.1 checked the changed Python files.
  • Sphinx 9.2.0 HTML build succeeded with two existing documentation warnings (missing _static and a duplicate label).
  • Windows, CPython 3.12: the same module had 10 passed, 3 expected failures, 3 subtests passed, and one failure in an existing symlink test because creating symlinks requires a Windows privilege. The full test suite was not run.

@codecov

codecov Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.20%. Comparing base (1a919d3) to head (a3305cf).
⚠️ Report is 49 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1060      +/-   ##
==========================================
- Coverage   76.51%   76.20%   -0.32%     
==========================================
  Files          62       61       -1     
  Lines        8308     8295      -13     
==========================================
- Hits         6357     6321      -36     
- Misses       1951     1974      +23     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sebastinas
sebastinas merged commit 02d86b8 into bpython:main Oct 30, 2026
2 of 12 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.

Support absolute paths in import completion skip list

2 participants