Skip to content

Only typecheck against a single version#1814

Open
xavdid wants to merge 2 commits into
masterfrom
RUN_DEVSDK-2440
Open

Only typecheck against a single version#1814
xavdid wants to merge 2 commits into
masterfrom
RUN_DEVSDK-2440

Conversation

@xavdid
Copy link
Copy Markdown
Member

@xavdid xavdid commented May 22, 2026

Why?

We used to typecheck a range of versions, but this wasn't actually adding much coverage. Ideally, we just check our types against a single modern version, since we get stricter checks. Incompatible syntax will be caught by unit tests, not type cehcks.

What?

  • remove the range and just check against a modern python version
  • remove arguments from typecheck justfile recipe
  • bump version we typecheck against

See Also

#1764

@xavdid xavdid requested a review from a team as a code owner May 22, 2026 21:37
@xavdid xavdid requested review from prathmesh-stripe and removed request for a team May 22, 2026 21:37
Copy link
Copy Markdown
Contributor

@prathmesh-stripe prathmesh-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would've been nicer to pick this from our list of supported versions but this is fine for now.

@prathmesh-stripe
Copy link
Copy Markdown
Contributor

There are some static checks that are failing in Python 3.13 that we need to fix before we merge this.

@xavdid xavdid changed the title bump typecheck range in CI Only typecheck against a single version May 27, 2026
Comment thread stripe/_http_client.py
if proxy:
if isinstance(proxy, str):
proxy = {"http": proxy, "https": proxy}
proxy = HTTPClient._Proxy(http=proxy, https=proxy)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is more correct than the inline dict, which the typechecking on 3.13 caught!

@xavdid
Copy link
Copy Markdown
Member Author

xavdid commented May 27, 2026

@prathmesh-stripe good call! i've updated CI to only check against a single (modern) version.

How does that look?

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.

2 participants