polyfactory
polyfactory copied to clipboard
Bug: pyright incompatability
Description
Pyright emits typing errors for accessing generic instance variables through classes.
Potentially related pyright issues:
- https://github.com/microsoft/pyright/issues/7089
- https://github.com/microsoft/pyright/discussions/7487
URL to code causing the issue
No response
MCVE
# Your MCVE code here
Steps to reproduce
1. Update pre-commit to v1.1.356
2. Run pre-commit commits
3. See that `error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues)` is emitted for usages of generic class vars.
Screenshots
"In the format of: "
Logs
No response
Release Version
main
Platform
- [ ] Linux
- [ ] Mac
- [ ] Windows
- [ ] Other (Please specify in the description above)
[!NOTE]
While we are open for sponsoring on GitHub Sponsors and OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.Check out all issues funded or available for funding on our Polar.sh dashboard
- If you would like to see an issue prioritized, make a pledge towards it!
- We receive the pledge once the issue is completed & verified
- This, along with engagement in the community, helps us know which features are a priority to our users.
Is there something we can do to fix this? I think the only option is to just # pyright: ignore[...] the affected (effected? idk english is annoying at times) lines right?