Skip to content

TYP/RFC: prefer TypeIs over cast - #551

Open
neutrinoceros wants to merge 1 commit into
mainfrom
typ/typeis
Open

TYP/RFC: prefer TypeIs over cast#551
neutrinoceros wants to merge 1 commit into
mainfrom
typ/typeis

Conversation

@neutrinoceros

Copy link
Copy Markdown
Owner

No description provided.

@neutrinoceros

Copy link
Copy Markdown
Owner Author

surprisingly, mypy still doesn't seem to handle TypeIs correctly and fails to narrow.

@neutrinoceros

Copy link
Copy Markdown
Owner Author

I'm considering I could stop running mypy on src and just check tests modules 🤔

@neutrinoceros

Copy link
Copy Markdown
Owner Author

The main benefit I get from mypy currently is that strict mode enforces high type coverage. I note that pyrefly 1.1 (dev) has a pyrefly coverage check command that raises the bar even higher and is generally much faster. I think I'll wait for pyrefly 1.1.0 final before I move this further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant