Skip to content

Fix mypy 2.x type errors in client and cloudpath modules#566

Merged
pjbull merged 2 commits into
masterfrom
uv-setup-lint-fix
Jun 9, 2026
Merged

Fix mypy 2.x type errors in client and cloudpath modules#566
pjbull merged 2 commits into
masterfrom
uv-setup-lint-fix

Conversation

@pjbull

@pjbull pjbull commented Jun 9, 2026

Copy link
Copy Markdown
Member

Latest mypy 2.x reports type errors that cause make lint to fail when dev dependencies are upgraded. This PR adds a ClassVar annotation for Client._default_client and narrows the return type of get_default_client() so lazy initialization type-checks correctly. In CloudPath._dispatch_to_path, path parent sequences now filter with isinstance(p, PurePosixPath) before calling _resolve. Linting passes locally with black, flake8, and mypy.

Closes #563

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot temporarily deployed to pull request June 9, 2026 23:10 Inactive
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot temporarily deployed to pull request June 9, 2026 23:12 Inactive
@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.0%. Comparing base (1d65750) to head (52d3b33).

Additional details and impacted files
@@          Coverage Diff           @@
##           master    #566   +/-   ##
======================================
  Coverage    94.0%   94.0%           
======================================
  Files          28      28           
  Lines        2222    2222           
======================================
  Hits         2090    2090           
  Misses        132     132           
Files with missing lines Coverage Δ
cloudpathlib/client.py 88.1% <100.0%> (ø)
cloudpathlib/cloudpath.py 94.8% <100.0%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pjbull pjbull merged commit 27d749e into master Jun 9, 2026
43 of 50 checks passed
@pjbull pjbull deleted the uv-setup-lint-fix branch June 9, 2026 23:48
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.

Failed build: tests

1 participant