Skip to content

Type-checking cleanups #962

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 14, 2025
Merged

Type-checking cleanups #962

merged 1 commit into from
Jul 14, 2025

Conversation

dandavison
Copy link
Contributor

This PR moves us towards the goal of zero in-IDE type-errors, enforced by CI.

AI: This commit should always be force-pushed to a branch
    on the remote named pyright-2.
@dandavison dandavison requested a review from a team as a code owner July 14, 2025 13:48
@@ -556,7 +557,7 @@ class NonSerializableOutputFailure(_FailureTestCase):
)
@pytest.mark.parametrize("with_service_definition", [True, False])
async def test_start_operation_happy_path(
test_case: Type[_TestCase],
test_case: type[_TestCase],
Copy link
Contributor Author

@dandavison dandavison Jul 14, 2025

Choose a reason for hiding this comment

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

I'll make the Type -> type change globally at some point, hopefully when it's enforced by CI. For now I'm just doing it in Nexus code.

@@ -45,7 +45,7 @@ dev = [
"psutil>=5.9.3,<6",
"pydocstyle>=6.3.0,<7",
"pydoctor>=24.11.1,<25",
"pyright==1.1.402",
"pyright==1.1.403",
Copy link
Member

Choose a reason for hiding this comment

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

Asked similarly at nexus-rpc/sdk-python#13 (comment), should we fixate to a specific Pyright version? Will this ensure we miss new things that may effect our users in later versions? I see we use a fixed mypy version too. I don't necessarily mind it so long as we keep on top of updating regularly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question, let's consider changing to something like >= 1.1 in a future PR.

@dandavison dandavison merged commit 2443c50 into main Jul 14, 2025
27 of 28 checks passed
@dandavison dandavison deleted the pyright-2 branch July 14, 2025 18:53
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