Skip to content

Moved regular expressions used in hot paths to global constants so th…#10506

Merged
erictraut merged 1 commit intomainfrom
regExOpt
May 26, 2025
Merged

Moved regular expressions used in hot paths to global constants so th…#10506
erictraut merged 1 commit intomainfrom
regExOpt

Conversation

@erictraut
Copy link
Collaborator

…ey don't need to be reconstructed each time.

…ey don't need to be reconstructed each time.
@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

sympy (https://github.com/sympy/sympy)
-   ...:1663:41 - error: Operator "*" not supported for types "Literal[2]" and "Unknown | Any | Basic | ZeroArray | ArrayTensorProduct | ArrayContraction | Tuple | Indexed | ImmutableDenseNDimArray | NDimArray | None"
+   ...:1663:41 - error: Operator "*" not supported for types "Literal[2]" and "Unknown | Any | Basic | Zero | ZeroArray | ArrayTensorProduct | ArrayContraction | Tuple | Indexed | ImmutableDenseNDimArray | NDimArray | None"
-   ...:1697:17 - error: Operator "-" not supported for type "Unknown | Any | Basic | ZeroArray | ArrayTensorProduct | ArrayContraction | Tuple | Indexed | ImmutableDenseNDimArray | NDimArray" (reportOperatorIssue)
+   ...:1697:17 - error: Operator "-" not supported for type "Unknown | Any | Basic | Zero | ZeroArray | ArrayTensorProduct | ArrayContraction | Tuple | Indexed | ImmutableDenseNDimArray | NDimArray" (reportOperatorIssue)

@erictraut erictraut merged commit 9cccf0e into main May 26, 2025
18 checks passed
@erictraut erictraut deleted the regExOpt branch May 26, 2025 20:06
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.

1 participant