Skip to content
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

refactor(api): Enable more type-checking inside pipette_handler.py #16523

Merged
merged 2 commits into from
Oct 28, 2024

Conversation

SyntaxColoring
Copy link
Contributor

@SyntaxColoring SyntaxColoring commented Oct 17, 2024

Overview

Delete some @overloads that didn't seem like they were doing anything, and reincorporate their parameter annotations into the main function definitions.

Formerly, the main function bodies were mostly not type-checked because the parameters didn't have annotations. (It's perhaps surprising that they didn't automatically "inherit" the annotations from the @overloads, but I guess mypy and pyright just don't work like that.) This fixes that.

Test Plan and Hands on Testing

None needed, just automated linting and tests.

Review requests

Any reason not to do this?

Risk assessment

Low.

The lack of parameter type annotations meant that these function bodies were mostly not type-checked. The overloads were not doing anything as far as I can tell, so just delete them to fix this.
@SyntaxColoring SyntaxColoring requested a review from a team as a code owner October 17, 2024 22:35
@SyntaxColoring SyntaxColoring requested a review from a team October 22, 2024 14:21
Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

To be fair, we did have that type ignore there. I don't remember why.

@SyntaxColoring SyntaxColoring merged commit 965bc0d into edge Oct 28, 2024
28 checks passed
@SyntaxColoring SyntaxColoring deleted the noverload branch October 28, 2024 14:23
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