Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix file rename check running on files that aren't part of the workspace #843

Merged
merged 3 commits into from
Nov 2, 2024

Conversation

DetachHead
Copy link
Owner

fixes #826

This comment has been minimized.

Copy link
Contributor

github-actions bot commented Nov 2, 2024

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

sympy (https://github.com/sympy/sympy)
-     Type of "term1" is "tuple[Unknown, ...] | Unknown | Product | Basic | Order | Any | Equality | Relational | Unequality" (reportUnknownVariableType)
+     Type of "term1" is "tuple[Unknown, ...] | Unknown | Product | Basic | Equality | Order | Relational | Unequality | Any" (reportUnknownVariableType)
-     Type of "doit" is "((**hints: Unknown) -> Equality) | Unknown | ((**hints: Unknown) -> Relational) | ((**hints: Unknown) -> Unequality) | ((**hints: Unknown) -> (tuple[Unknown, ...] | Unknown | Product | Basic | Order | Any))" (reportUnknownMemberType)
+     Type of "doit" is "((**hints: Unknown) -> Equality) | Unknown | ((**hints: Unknown) -> Relational) | ((**hints: Unknown) -> Unequality) | ((**hints: Unknown) -> (tuple[Unknown, ...] | Unknown | Product | Basic | Equality | Order | Relational | Unequality | Any))" (reportUnknownMemberType)
-     Type of "term2" is "tuple[Unknown, ...] | Unknown | Product | Basic | Order | Any | Equality | Relational | Unequality" (reportUnknownVariableType)
+     Type of "term2" is "tuple[Unknown, ...] | Unknown | Product | Basic | Equality | Order | Relational | Unequality | Any" (reportUnknownVariableType)
-     Type of "doit" is "((**hints: Unknown) -> Equality) | Unknown | ((**hints: Unknown) -> Relational) | ((**hints: Unknown) -> Unequality) | ((**hints: Unknown) -> (tuple[Unknown, ...] | Unknown | Product | Basic | Order | Any))" (reportUnknownMemberType)
+     Type of "doit" is "((**hints: Unknown) -> Equality) | Unknown | ((**hints: Unknown) -> Relational) | ((**hints: Unknown) -> Unequality) | ((**hints: Unknown) -> (tuple[Unknown, ...] | Unknown | Product | Basic | Equality | Order | Relational | Unequality | Any))" (reportUnknownMemberType)
-     Type of "f" is "tuple[Unknown, ...] | Unknown | Product | Basic | Order | Any | Equality | Relational | Unequality" (reportUnknownVariableType)
+     Type of "f" is "tuple[Unknown, ...] | Unknown | Product | Basic | Equality | Order | Relational | Unequality | Any" (reportUnknownVariableType)
-     Type of "doit" is "((**hints: Unknown) -> Equality) | Unknown | ((**hints: Unknown) -> Relational) | ((**hints: Unknown) -> Unequality) | ((**hints: Unknown) -> (tuple[Unknown, ...] | Unknown | Product | Basic | Order | Any))" (reportUnknownMemberType)
+     Type of "doit" is "((**hints: Unknown) -> Equality) | Unknown | ((**hints: Unknown) -> Relational) | ((**hints: Unknown) -> Unequality) | ((**hints: Unknown) -> (tuple[Unknown, ...] | Unknown | Product | Basic | Equality | Order | Relational | Unequality | Any))" (reportUnknownMemberType)
-     Type of "doit" is "((**hints: Unknown) -> Equality) | Unknown | ((**hints: Unknown) -> Relational) | ((**hints: Unknown) -> Unequality) | ((**hints: Unknown) -> (tuple[Unknown, ...] | Unknown | Product | Basic | Order | Any))" (reportUnknownMemberType)
+     Type of "doit" is "((**hints: Unknown) -> Equality) | Unknown | ((**hints: Unknown) -> Relational) | ((**hints: Unknown) -> Unequality) | ((**hints: Unknown) -> (tuple[Unknown, ...] | Unknown | Product | Basic | Equality | Order | Relational | Unequality | Any))" (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/sympy/sympy/stats/rv.py:473:26 - warning: Type of "probability" is partially unknown
+     Type of "probability" is "(condition: Unknown, **kwargs: Unknown) -> (Unknown | Order | Lambda | Probability | Self@Expr | tuple[Unknown, ...] | Sum | Any | Piecewise | Basic | Equality | Relational | Unequality | int)" (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/sympy/sympy/stats/rv.py:983:16 - warning: Return type is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/stats/rv.py:983:16 - warning: Return type, "Unknown | Lambda | Any | dict[Unknown, Unknown]", is partially unknown (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/stats/rv.py:1018:16 - warning: Return type is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/stats/rv.py:1018:16 - warning: Return type, "Unknown | Lambda | Any", is partially unknown (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/stats/rv.py:1029:16 - warning: Return type is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/stats/rv.py:1029:16 - warning: Return type, "Unknown | Lambda | Any", is partially unknown (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/stats/rv.py:1063:16 - warning: Return type is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/stats/rv.py:1063:16 - warning: Return type, "Unknown | ConditionalFiniteDomain | Any", is partially unknown (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/stats/stochastic_process_types.py:527:13 - warning: Type of "condition" is partially unknown
-     Type of "condition" is "Relational | Equality | Unequality | Unknown" (reportUnknownVariableType)
-     Type of "condition" is "_NotImplementedType | Unknown" (reportUnknownVariableType)
+     Type of "condition" is "_NotImplementedType | StrictLessThan | Unknown | Equality | Relational | Unequality" (reportUnknownVariableType)
-     Type of "condition" is "_NotImplementedType | Unknown" (reportUnknownVariableType)
+     Type of "condition" is "_NotImplementedType | StrictGreaterThan | Unknown | Equality | Relational | Unequality" (reportUnknownVariableType)
-     Type of "condition" is "_NotImplementedType | Unknown" (reportUnknownVariableType)
+     Type of "condition" is "_NotImplementedType | LessThan | Unknown | Equality | Relational | Unequality" (reportUnknownVariableType)
-     Type of "condition" is "_NotImplementedType | Unknown" (reportUnknownVariableType)
+     Type of "condition" is "_NotImplementedType | GreaterThan | Unknown | Equality | Relational | Unequality" (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/stats/symbolic_multivariate_probability.py:178:31 - warning: Type of "expand" is partially unknown
+     Type of "expand" is "((**hints: Unknown) -> (ZeroMatrix | VarianceMatrix | Unknown | Expr)) | ((**hints: Unknown) -> (Unknown | Variance | Expr))" (reportUnknownMemberType)
-     Type of "expand" is "((**hints: Unknown) -> Unknown) | ((**hints: Unknown) -> (Unknown | CrossCovarianceMatrix | Covariance | Add))" (reportUnknownMemberType)
+     Type of "expand" is "((**hints: Unknown) -> (Unknown | ZeroMatrix | CrossCovarianceMatrix | Add)) | ((**hints: Unknown) -> (Unknown | CrossCovarianceMatrix | Covariance | Add))" (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/sympy/sympy/stats/symbolic_multivariate_probability.py:259:9 - warning: Return type, "ZeroMatrix | VarianceMatrix | Unknown | Expr | CrossCovarianceMatrix | Add", is partially unknown (reportUnknownParameterType)
+   /tmp/mypy_primer/projects/sympy/sympy/stats/symbolic_multivariate_probability.py:259:9 - warning: Return type, "Unknown | ZeroMatrix | CrossCovarianceMatrix | Add", is partially unknown (reportUnknownParameterType)
-     Type of "expand" is "(**hints: Unknown) -> (ZeroMatrix | VarianceMatrix | Unknown | Expr)" (reportUnknownMemberType)
+     Type of "expand" is "(**hints: Unknown) -> Unknown" (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/sympy/sympy/stats/symbolic_multivariate_probability.py:265:20 - warning: Return type, "ZeroMatrix | VarianceMatrix | Unknown | Expr", is partially unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/stats/symbolic_multivariate_probability.py:265:20 - warning: Return type is unknown (reportUnknownVariableType)
-     Type of "expand" is "Unknown | ((deep: bool = True, modulus: Unknown | None = None, power_base: bool = True, power_exp: bool = True, mul: bool = True, log: bool = True, multinomial: bool = True, basic: bool = True, **hints: Unknown) -> (Unknown | Order | Any | RandomSymbol))" (reportUnknownMemberType)
+     Type of "expand" is "Unknown | ((deep: bool = True, modulus: Unknown | None = None, power_base: bool = True, power_exp: bool = True, mul: bool = True, log: bool = True, multinomial: bool = True, basic: bool = True, **hints: Unknown) -> (Unknown | Order | Any | Self@Expr))" (reportUnknownMemberType)
-     Type of "expand" is "((**hints: Unknown) -> Unknown) | ((**hints: Unknown) -> (Unknown | CrossCovarianceMatrix | Covariance | Add))" (reportUnknownMemberType)
+     Type of "expand" is "((**hints: Unknown) -> (Unknown | ZeroMatrix | CrossCovarianceMatrix | Add)) | ((**hints: Unknown) -> (Unknown | CrossCovarianceMatrix | Covariance | Add))" (reportUnknownMemberType)
-     Type of "expand" is "Unknown | ((deep: bool = True, modulus: Unknown | None = None, power_base: bool = True, power_exp: bool = True, mul: bool = True, log: bool = True, multinomial: bool = True, basic: bool = True, **hints: Unknown) -> (Unknown | Order | Any | RandomSymbol))" (reportUnknownMemberType)
+     Type of "expand" is "Unknown | ((deep: bool = True, modulus: Unknown | None = None, power_base: bool = True, power_exp: bool = True, mul: bool = True, log: bool = True, multinomial: bool = True, basic: bool = True, **hints: Unknown) -> (Unknown | Order | Any | Self@Expr))" (reportUnknownMemberType)
-     Type of "expand" is "((**hints: Unknown) -> (ZeroMatrix | VarianceMatrix | Unknown | Expr)) | ((**hints: Unknown) -> (Unknown | Variance | Expr)) | Unknown | Any | ((deep: bool = True, modulus: Unknown | None = None, power_base: bool = True, power_exp: bool = True, mul: bool = True, log: bool = True, multinomial: bool = True, basic: bool = True, **hints: Unknown) -> (Unknown | Order | Any | CentralMoment))" (reportUnknownMemberType)

... (truncated 1334 lines) ...

black (https://github.com/psf/black): 3.66x slower (4.5s -> 16.3s in a single noisy sample)

AutoSplit (https://github.com/Toufool/AutoSplit): 619.93x slower (0.0s -> 16.8s in a single noisy sample)

@DetachHead DetachHead merged commit 4eeb4ef into main Nov 2, 2024
20 checks passed
@DetachHead DetachHead deleted the fix-renaming-untracked-files branch November 2, 2024 06:50
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.

VSCode: Renaming (any) file in the filetree is very long
1 participant