Skip to content

Conversation

debonte
Copy link
Contributor

@debonte debonte commented May 5, 2025

Fix Variable not allowed in type expression issues in sympy-stubs. I guess this is a recent fix/behavior change in Pyright.

/home/runner/work/python-type-stubs/python-type-stubs/stubs/sympy-stubs/polys/domains/algebraicfield.pyi:18:31 - error: Variable not allowed in type expression (reportInvalidTypeForm)
Error: Variable not allowed in type expression (reportInvalidTypeForm)
/home/runner/work/python-type-stubs/python-type-stubs/stubs/sympy-stubs/polys/domains/algebraicfield.pyi:43:79 - error: Variable not allowed in type expression (reportInvalidTypeForm)
Error: Variable not allowed in type expression (reportInvalidTypeForm)
/home/runner/work/python-type-stubs/python-type-stubs/stubs/sympy-stubs/polys/domains/expressiondomain.pyi:50:32 - error: Variable not allowed in type expression (reportInvalidTypeForm)
Error: Variable not allowed in type expression (reportInvalidTypeForm)
/home/runner/work/python-type-stubs/python-type-stubs/stubs/sympy-stubs/polys/domains/integerring.pyi:16:14 - error: Variable not allowed in type expression (reportInvalidTypeForm)
Error: Variable not allowed in type expression (reportInvalidTypeForm)
/home/runner/work/python-type-stubs/python-type-stubs/stubs/sympy-stubs/polys/domains/integerring.pyi:28:28 - error: Variable not allowed in type expression (reportInvalidTypeForm)
Error: Variable not allowed in type expression (reportInvalidTypeForm)
/home/runner/work/python-type-stubs/python-type-stubs/stubs/sympy-stubs/polys/domains/old_fractionfield.pyi:14:31 - error: Variable not allowed in type expression (reportInvalidTypeForm)
Error: Variable not allowed in type expression (reportInvalidTypeForm)
/home/runner/work/python-type-stubs/python-type-stubs/stubs/sympy-stubs/polys/domains/old_fractionfield.pyi:36:31 - error: Variable not allowed in type expression (reportInvalidTypeForm)
Error: Variable not allowed in type expression (reportInvalidTypeForm)
/home/runner/work/python-type-stubs/python-type-stubs/stubs/sympy-stubs/polys/domains/old_polynomialring.pyi:53:25 - error: Variable not allowed in type expression (reportInvalidTypeForm)
Error: Variable not allowed in type expression (reportInvalidTypeForm)
/home/runner/work/python-type-stubs/python-type-stubs/stubs/sympy-stubs/polys/domains/rationalfield.pyi:[22](https://github.com/microsoft/python-type-stubs/actions/runs/14805952987/job/41674194643?pr=361#step:6:23):14 - error: Variable not allowed in type expression (reportInvalidTypeForm)
Error: Variable not allowed in type expression (reportInvalidTypeForm)
/home/runner/work/python-type-stubs/python-type-stubs/stubs/sympy-stubs/polys/domains/rationalfield.pyi:39:28 - error: Variable not allowed in type expression (reportInvalidTypeForm)
Error: Variable not allowed in type expression (reportInvalidTypeForm)
/home/runner/work/python-type-stubs/python-type-stubs/stubs/sympy-stubs/polys/domains/rationalfield.pyi:40:61 - error: Variable not allowed in type expression (reportInvalidTypeForm)
Error: Variable not allowed in type expression (reportInvalidTypeForm)
11 errors, 0 warnings, 0 informations
Error: 11 errors

@Avasam
Copy link
Contributor

Avasam commented May 5, 2025

Looks like I duplicated this in #367.
I think the dtype attributes should be kept though, just not used as type aliases

@debonte debonte closed this May 5, 2025
@debonte debonte deleted the reportInvalidTypeForm branch May 5, 2025 20:17
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