Skip to content

Conversation

@bkircher
Copy link
Owner

@bkircher bkircher commented Oct 31, 2025

Changes:

  • Add basedpyright
  • Update changelog
  • Annotate _repr_ and _eq_ overrides with fallback
  • Declare spec attributes for basedpyright
  • Add basedpyright run to CI workflow

Link: https://docs.basedpyright.com/

- add @OverRide to Requirement.eq, repr and Package.repr
- provide typing.override shim with positional-only signature
Add basedpyright and configure it in pyproject.toml. Allow explicit Any
and annotate regex helpers with typed Pattern/Match.
- mark setter macro helper as abstract via ABC mixin
- define Spec/Package attribute fields with defaults
- teach tests to assert non-None before macro expansion
Ensure GitHub Actions runs basedpyright alongside mypy (for now).
@bkircher bkircher self-assigned this Oct 31, 2025
Conditionally import the override decorator so Python 3.11's typing
module no longer breaks the basedpyright step.
- tighten spec parser typing with override shim and safer macros
- annotate helper scripts and tests to make basedpyright happy
Ensure type checkers always import typing_extensions.override so
basedpyright sees the decorator and stops reporting implicit override
warnings on Python 3.11. Limit the runtime no-op fallback to define its
own TypeVar only when typing_extensions is absent.
@bkircher bkircher marked this pull request as ready for review October 31, 2025 12:33
@bkircher bkircher merged commit 908b4c7 into main Oct 31, 2025
18 checks passed
@bkircher bkircher deleted the typing-fixes branch October 31, 2025 12: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.

2 participants