Repository navigation
completion: pass shtab the preamble for the selected shell - #11129
Merged
Merged
Conversation
shtab 1.13 annotates complete(preamble=...) as str, so passing the per-shell dict fails mypy on main. Pick the shell's preamble ourselves, which is what shtab does with a dict; the generated bash and zsh scripts are unchanged.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #11129 +/- ##
==========================================
+ Coverage 90.68% 90.97% +0.29%
==========================================
Files 504 505 +1
Lines 39795 41139 +1344
Branches 3141 3263 +122
==========================================
+ Hits 36087 37428 +1341
- Misses 3042 3072 +30
+ Partials 666 639 -27 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
skshetry
approved these changes
Oct 29, 2026
skshetry
added a commit
to adarshsm/dvc
that referenced
this pull request
Nov 6, 2026
* origin/main: [pre-commit.ci] pre-commit autoupdate (treeverse#11066) build(deps-dev): bump mypy from 1.19.1 to 2.4.1 (treeverse#11131) build(deps): bump rtCamp/action-slack-notify from 2.4.0 to 2.4.1 (treeverse#11130) build(deps): bump github/codeql-action from 4.37.4 to 4.39.1 (treeverse#11125) add support for 3.15 (treeverse#11135) completion: pass shtab the preamble for the selected shell (treeverse#11129) build(deps): bump actions/setup-python from 6 to 7 (treeverse#11073) build(deps): bump github/codeql-action from 4 to 4.37.4 (treeverse#11077)
skshetry
added a commit
to adarshsm/dvc
that referenced
this pull request
Nov 6, 2026
* origin/main: fix: fall back to full index when pull/checkout targets mix .dvc files and paths (treeverse#11076) [pre-commit.ci] pre-commit autoupdate (treeverse#11066) build(deps-dev): bump mypy from 1.19.1 to 2.4.1 (treeverse#11131) build(deps): bump rtCamp/action-slack-notify from 2.4.0 to 2.4.1 (treeverse#11130) build(deps): bump github/codeql-action from 4.37.4 to 4.39.1 (treeverse#11125) add support for 3.15 (treeverse#11135) completion: pass shtab the preamble for the selected shell (treeverse#11129)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The lint job has failed on
mainsince shtab 1.13, which annotatescomplete(preamble=...)asstr. The failure shows up on every open PR:shtab still accepts a dict, and all it does with one is take
preamble.get(shell, ""). This change does that before the call. Behaviour is unchanged:dvc completion -s bashanddvc completion -s zshproduce byte-identical output before and after, andtests/unit/command/test_completion.pypasses.❗ I have followed the Contributing to DVC checklist.
📖 If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here. (No docs change needed.)