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 issue where an empty baseline file was being automatically created when running basedpyright from the CLI #718

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

DetachHead
Copy link
Owner

No description provided.

@DetachHead DetachHead changed the title fix issue where an empty baseline file was being written automatically created when there wasn't one already fix issue where an empty baseline file was being automatically created Sep 30, 2024
@DetachHead DetachHead force-pushed the fix-empty-baseline-file branch from e354d61 to a7b51db Compare September 30, 2024 14:01
@DetachHead DetachHead changed the title fix issue where an empty baseline file was being automatically created fix issue where an empty baseline file was being automatically created when running basedpyright from the CLI Sep 30, 2024
@DetachHead DetachHead force-pushed the fix-empty-baseline-file branch from a7b51db to f448f45 Compare September 30, 2024 14:05
@DetachHead DetachHead merged commit c94fc68 into main Sep 30, 2024
19 checks passed
@DetachHead DetachHead deleted the fix-empty-baseline-file branch September 30, 2024 14:18
Copy link
Contributor

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

sympy (https://github.com/sympy/sympy)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/recurr.py:438:24 - error: Argument type is Any
+     Argument corresponds to parameter "bases" in function "__init__" (reportAny)
-     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))" (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 "i_part" is "Unknown | Order | Any" (reportUnknownVariableType)
+     Type of "i_part" is "Unknown | Order | Any | Self@Expr" (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)) | Any" (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)) | Any" (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/simplex.py:272:13 - error: Type of "d" is partially unknown
+     Type of "d" is "Unknown | list[None]" (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/simplex.py:272:16 - error: Type of "p" is partially unknown
+     Type of "p" is "Unknown | list[None]" (reportUnknownVariableType)
-     Type of "ivl" is "Any | Unknown" (reportUnknownVariableType)
+     Type of "ivl" is "Unknown | Any" (reportUnknownVariableType)
-     Type of "as_set" is "Any | Unknown" (reportUnknownMemberType)
+     Type of "as_set" is "Any | (() -> Unknown) | Unknown" (reportUnknownMemberType)
-     Type of "sqrtdenest" is "(expr: Unknown, max_iter: int = 3) -> (Unknown | Mul | Pow | Order | Expr | Add | None)" (reportUnknownVariableType)
+     Type of "sqrtdenest" is "(expr: Unknown, max_iter: int = 3) -> Unknown" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/solvers.py:2788:21 - error: Type of "b" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/solvers.py:2788:21 - error: Type of "b" is partially unknown
+     Type of "b" is "Mul | Unknown | Integer | Expr" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/solvers.py:2788:24 - error: Type of "e" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/solvers.py:2788:24 - error: Type of "e" is partially unknown
+     Type of "e" is "Unknown | Expr | Mul | None" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/solvers.py:2788:28 - error: Type of "as_base_exp" is unknown (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/solvers.py:2788:28 - error: Type of "as_base_exp" is partially unknown
+     Type of "as_base_exp" is "Unknown | (() -> (tuple[Mul, Unknown] | tuple[Mul, Expr | None])) | (() -> (tuple[Unknown | Integer, Unknown | Mul] | tuple[Expr, Expr])) | (() -> tuple[Expr, Expr])" (reportUnknownMemberType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/solvers.py:2788:44 - error: "as_base_exp" is not a known attribute of "None" (reportOptionalMemberAccess)
-     Type of "check" is "list[Unknown]" (reportUnknownVariableType)
+     Type of "check" is "list[Unknown | Mul | Pow | Order | Expr | Add | None]" (reportUnknownVariableType)
-     Type of "extend" is "(iterable: Iterable[Unknown], /) -> None" (reportUnknownMemberType)
+     Type of "extend" is "(iterable: Iterable[Unknown | Mul | Pow | Order | Expr | Add | None], /) -> None" (reportUnknownMemberType)
-     Type of "extend" is "(iterable: Iterable[Unknown], /) -> None" (reportUnknownMemberType)
+     Type of "extend" is "(iterable: Iterable[Unknown | Mul | Pow | Order | Expr | Add | None], /) -> None" (reportUnknownMemberType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/solvers.py:2793:21 - error: Type of "s" is unknown (reportUnknownVariableType)
+   /tmp/mypy_primer/projects/sympy/sympy/solvers/solvers.py:2793:21 - error: Type of "s" is partially unknown
+     Type of "s" is "Unknown | Mul | Pow | Order | Expr | Add | None" (reportUnknownVariableType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/solvers.py:2794:44 - error: Argument type is unknown
-     Argument corresponds to parameter "sol" in function "checksol" (reportUnknownArgumentType)
-   /tmp/mypy_primer/projects/sympy/sympy/solvers/solvers.py:2798:36 - error: Argument type is unknown
-     Argument corresponds to parameter "object" in function "append" (reportUnknownArgumentType)
-     Type of "g" is "Unknown | Order | Any" (reportUnknownVariableType)
+     Type of "g" is "Unknown | Order | Any | Self@Expr" (reportUnknownVariableType)
-     Type of "h" is "Unknown | Order | Any" (reportUnknownVariableType)
+     Type of "h" is "Unknown | Order | Any | Self@Expr" (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))" (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 "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))" (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 "g" is "Unknown | Order | Basic | Any" (reportUnknownVariableType)
+     Type of "g" is "Unknown | Order | Basic | Self@Expr | Any" (reportUnknownVariableType)
-     Type of "h" is "Unknown | Order | Basic | Any" (reportUnknownVariableType)
+     Type of "h" is "Unknown | Order | Basic | Self@Expr | Any" (reportUnknownVariableType)
-     Type of "subs" is "Unknown | ((...) -> (Unknown | Order | Basic)) | Any" (reportUnknownMemberType)
+     Type of "subs" is "Unknown | ((...) -> (Unknown | Order | Basic)) | Any | ((...) -> (Unknown | Self@Expr | Basic))" (reportUnknownMemberType)
-     Type of "subs" is "Unknown | ((...) -> (Unknown | Order | Basic)) | Any" (reportUnknownMemberType)
+     Type of "subs" is "Unknown | ((...) -> (Unknown | Order | Basic)) | Any | ((...) -> (Unknown | Self@Expr | Basic))" (reportUnknownMemberType)
-     Type of "g" is "Unknown | Order | Any" (reportUnknownVariableType)
+     Type of "g" is "Unknown | Order | Any | Self@Expr" (reportUnknownVariableType)
-     Type of "h" is "Unknown | Order | Any" (reportUnknownVariableType)
+     Type of "h" is "Unknown | Order | Any | Self@Expr" (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))" (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 "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))" (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 "g" is "Unknown | Order | Basic | Any" (reportUnknownVariableType)
+     Type of "g" is "Unknown | Order | Basic | Self@Expr | Any" (reportUnknownVariableType)
-     Type of "h" is "Unknown | Order | Basic | Any" (reportUnknownVariableType)
+     Type of "h" is "Unknown | Order | Basic | Self@Expr | Any" (reportUnknownVariableType)
-     Type of "subs" is "Unknown | ((...) -> (Unknown | Order | Basic)) | Any" (reportUnknownMemberType)
+     Type of "subs" is "Unknown | ((...) -> (Unknown | Order | Basic)) | Any | ((...) -> (Unknown | Self@Expr | Basic))" (reportUnknownMemberType)
-     Type of "subs" is "Unknown | ((...) -> (Unknown | Order | Basic)) | Any" (reportUnknownMemberType)
+     Type of "subs" is "Unknown | ((...) -> (Unknown | Order | Basic)) | Any | ((...) -> (Unknown | Self@Expr | Basic))" (reportUnknownMemberType)

... (truncated 494 lines) ...

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