deps: pin black==26.5.1 and mypy==2.3.0 to match TSC - #454
Open
jacalata wants to merge 1 commit into
Open
Conversation
The two Tableau-owned Python packages (tabcmd and tableauserverclient)
were on divergent dev-tool versions:
tabcmd TSC
black >=22,<23 ==26.5.1
mypy unpinned ==2.3.0
Anyone working on both repos (e.g. porting fixes back and forth) has
to constantly swap black versions in their local env. Match TSC's
pins on the tabcmd side; older repos of the two are the outlier here.
Consequential changes from the version bumps:
- black 26 reformats 9 files (whitespace around decorators, blank-line
policy after imports). No behavior change.
- black 26 also requires bumping `target-version` -- switched to
py310-py314 to match tabcmd's `requires-python` and `classifiers`
list (was py310-py311 only).
- Dropped `required-version = 22` from [tool.black]; TSC doesn't use
one and the versioned pin in [test] is enough.
- mypy 2.3 caught one pre-existing issue: tabcmd/version.py
re-imported `version` under the same name inside a fallback branch
(`from tabcmd._version import version`), which shadows the
`version: str = "unknown"` annotation. Renamed the fallback import
to `_pyinstaller_version` and assigned.
Verified:
- black . --check passes
- mypy tabcmd tests passes with 0 errors (was 1 with mypy 2.3)
- Full unit-test suite: 337 passed, 2 skipped
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.
Motivation
The two Tableau-owned Python packages were on divergent dev-tool versions:
>=22,<23==26.5.1==26.5.1==2.3.0==2.3.0Anyone working on both repos has to keep swapping black versions in
their local env. Match TSC's pins on the tabcmd side; the older repo is
the outlier.
Behavior change
For contributors:
black 26reformats 9 files (whitespace around decorators, blanklines after imports). No behavior change; all diffs are whitespace or
trailing-comma noise.
[tool.black]target-versionbumped from py310-py311 topy310-py314, matching
requires-python = ">=3.10"and theclassifierslist.required-version = 22line from[tool.black]; the versionpin in
[test]is sufficient.mypy 2.3 caught one pre-existing issue in
tabcmd/version.py:from tabcmd._version import versionreimported the same name inside afallback branch, shadowing the
version: str = "unknown"annotation.Renamed the fallback import to
_pyinstaller_version. Same string endsup in
version.Test plan
black . --checkpasses under black 26.5.1mypy tabcmd testspasses with 0 errors under mypy 2.3.0🤖 Generated with Claude Code