Skip to content

Conversation

@dangotbanned
Copy link
Member

@dangotbanned dangotbanned commented May 20, 2025

What type of PR is this? (check all applicable)

  • πŸ’Ύ Refactor
  • ✨ Feature
  • πŸ› Bug Fix
  • πŸ”§ Optimization
  • πŸ“ Documentation
  • βœ… Test
  • 🐳 Other

Related issues

Checklist

  • Code follows style guide (ruff)
  • Tests added
  • Documented the changes

If you have comments or can explain your changes, please do so below

Module doc preview

image


I was originally expecting we'd need to add some config for ruff and mypy.
Haven't had any issues without it, so I'm not sure we need it?

@dangotbanned dangotbanned mentioned this pull request May 20, 2025
73 tasks
@dangotbanned dangotbanned marked this pull request as ready for review May 20, 2025 17:53
@dangotbanned
Copy link
Member Author

dangotbanned commented May 20, 2025

To expand on the link to (#2572) some more ...

Ideally, it would be good to (statically) know the type of every node in an expression.
Pragmatically, it would be good to preserve the static types where we can - but fall back to a base class (default) when we can't.

There's a big benefit to knowing as much information of the graph as possible - to avoid needing assert, isinstance, cast, etc littered everywhere

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

nice, thanks @dangotbanned

@MarcoGorelli MarcoGorelli merged commit ede1bd3 into main May 21, 2025
32 checks passed
@MarcoGorelli MarcoGorelli deleted the typing-compat branch May 21, 2025 10:20
dangotbanned added a commit that referenced this pull request May 22, 2025
- Needed to add the `ruff` config in the end (#2578)
- Prevented forward refs in `TypeVar` from showing as unused imports
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.

3 participants