Skip to content

deps: pin black==26.5.1 and mypy==2.3.0 to match TSC - #454

Open
jacalata wants to merge 1 commit into
developmentfrom
jac/pin-dev-tools
Open

deps: pin black==26.5.1 and mypy==2.3.0 to match TSC#454
jacalata wants to merge 1 commit into
developmentfrom
jac/pin-dev-tools

Conversation

@jacalata

@jacalata jacalata commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

The two Tableau-owned Python packages (tabcmd and tableauserverclient) were on divergent dev-tool versions:

tabcmd (before) tabcmd (after) TSC
black `>=22,<23` `==26.5.1` `==26.5.1`
mypy unpinned `==2.3.0` `==2.3.0`

Anyone working on both repos (porting fixes back and forth) has to keep swapping black versions in their local env. Match TSC's pins on the tabcmd side; the older repo of the two is the outlier.

Consequential changes from the version bump

  • black 26 reformats 9 files (whitespace around decorators, blank-line policy after imports). No behaviour change; the diffs are all whitespace / trailing-comma noise.
  • black 26 also required bumping the `[tool.black]` `target-version` — switched to py310-py314 to match tabcmd's `requires-python = ">=3.10"` and `classifiers` list (was py310-py311 only).
  • Dropped the `required-version = 22` line from `[tool.black]`; the versioned pin in `[test]` is enough, and TSC doesn't use one either.
  • 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 shadowed the `version: str = "unknown"` annotation. Renamed the fallback import to `_pyinstaller_version` and reassigned. No behavioural change (same value ends up in `version`).

Test plan

  • `black . --check` passes under black 26.5.1
  • `mypy tabcmd tests` passes with 0 errors under mypy 2.3.0 (was 1 error)
  • Full unit-test suite: 337 passed, 2 skipped

🤖 Generated with Claude Code

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
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

Coverage

Coverage Report
FileStmtsMissCoverMissing
tabcmd
   __main__.py121212 0%
   _version.py111111 0%
   tabcmd.py151515 0%
   version.py1066 40%
tabcmd/commands
   commands.py101010 0%
   constants.py771818 77%
   server.py1351818 87%
tabcmd/commands/auth
   session.py3945050 87%
tabcmd/commands/datasources_and_workbooks
   datasources_and_workbooks_command.py1571818 89%
   datasources_workbooks_views_url_parser.py14255 96%
   delete_command.py601616 73%
   export_command.py1202525 79%
   get_url_command.py1274747 63%
   publish_command.py1232828 77%
   runschedule_command.py2177 67%
tabcmd/commands/extracts
   create_extracts_command.py4288 81%
   decrypt_extracts_command.py2722 93%
   delete_extracts_command.py3766 84%
   encrypt_extracts_command.py2722 93%
   extracts.py2022 90%
   reencrypt_extracts_command.py2722 93%
   refresh_extracts_command.py481010 79%
tabcmd/commands/group
   create_group_command.py2955 83%
   delete_group_command.py2722 93%
tabcmd/commands/project
   create_project_command.py4688 83%
   delete_project_command.py3544 89%
   publish_samples_command.py3044 87%
tabcmd/commands/site
   create_site_command.py3455 85%
   delete_site_command.py2722 93%
   edit_site_command.py3822 95%
   list_command.py771212 84%
   list_sites_command.py2922 93%
tabcmd/commands/user
   add_users_command.py2955 83%
   create_site_users.py581111 81%
   create_users_command.py5999 85%
   delete_site_users_command.py4355 88%
   user_data.py2223131 86%
tabcmd/execution
   _version.py222 0%
   global_options.py12588 94%
   localize.py661111 83%
   logger_config.py6066 90%
   tabcmd_controller.py4277 83%
TOTAL287445984% 

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.

1 participant