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 all reportInvalidTypeForm #332

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ reportUnsupportedDunderAll = "error"
reportAssertTypeFailure = "none" # TODO
reportAttributeAccessIssue = "none" # TODO
reportGeneralTypeIssues = "none" # TODO
reportInvalidTypeForm = "none" # TODO
reportUndefinedVariable = "none" # TODO

[tool.mypy]
Expand Down
13 changes: 11 additions & 2 deletions stubs/matplotlib/font_manager.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,17 @@ def win32FontDirectory(): ...
def win32InstalledFonts(directory=..., fontext=...): ...
def get_fontconfig_fonts(fontext=...): ...
def findSystemFonts(fontpaths=..., fontext=...): ...

FontEntry = ...
@dataclass
class FontEntry:
fname: str = ...
name: str = ...
style: str = ...
variant: str = ...
weight: str | int = ...
stretch: str = ...
size: str = ...
def _repr_html_(self) -> str: ...
def _repr_png_(self) -> bytes: ...

def ttfFontProperty(font: FT2Font) -> FontEntry: ...
def afmFontProperty(fontpath, font: AFM) -> FontEntry: ...
Expand Down
5 changes: 2 additions & 3 deletions stubs/sympy-stubs/core/evalf.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from typing import Any, Callable, Dict as tDict, List, Optional, Self, Tuple as tTuple, Type, Union as tUnion, overload

from mpmath import mpc, mpf
from sympy.concrete.products import Product
from sympy.concrete.summations import Sum
from sympy.core.add import Add
Expand Down Expand Up @@ -67,11 +66,11 @@ def evalf_atan(v: atan, prec: int, options: OPT_DICT) -> TMP_RES: ...
def evalf_subs(prec: int, subs: dict) -> dict: ...
def evalf_piecewise(expr: Expr, prec: int, options: OPT_DICT) -> TMP_RES: ...
def evalf_alg_num(a: AlgebraicNumber, prec: int, options: OPT_DICT) -> TMP_RES: ...
def as_mpmath(x: Any, prec: int, options: OPT_DICT) -> tUnion[mpc, mpf]: ...
def as_mpmath(x: Any, prec: int, options: OPT_DICT): ...
def do_integral(expr: Integral, prec: int, options: OPT_DICT) -> TMP_RES: ...
def evalf_integral(expr: Integral, prec: int, options: OPT_DICT) -> TMP_RES: ...
def check_convergence(numer: Expr, denom: Expr, n: Symbol) -> tTuple[int, Any, Any]: ...
def hypsum(expr: Expr, n: Symbol, start: int, prec: int) -> mpf: ...
def hypsum(expr: Expr, n: Symbol, start: int, prec: int): ...
Comment on lines -70 to +73
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This followed the runtime annotation, which itself was invalid

def evalf_prod(expr: Product, prec: int, options: OPT_DICT) -> TMP_RES: ...
def evalf_sum(expr: Sum, prec: int, options: OPT_DICT) -> TMP_RES: ...
def evalf_symbol(x: Expr, prec: int, options: OPT_DICT) -> TMP_RES: ...
Expand Down
3 changes: 2 additions & 1 deletion stubs/sympy-stubs/testing/runtests.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import doctest as pdoctest
from collections import namedtuple
from contextlib import contextmanager
from doctest import DocTestFinder, DocTestRunner
from typing import Any, Generator, Literal
Expand Down Expand Up @@ -32,7 +33,7 @@ sp = ...

def split_list(l, split, density=...): ...

SymPyTestResults = ...
SymPyTestResults = namedtuple("SymPyTestResults", "failed attempted")

def sympytestfile(
filename,
Expand Down
2 changes: 1 addition & 1 deletion stubs/vispy/scene/visuals.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ from ..scene.node import Node
from ..visuals.filters import Alpha, PickingFilter
from .node import Node

_T = ...
_T = TypeVar("_T")

class VisualNode(Node):
_next_id: int = ...
Expand Down
Loading