Skip to content

Commit

Permalink
Fix all reportInvalidTypeForm
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Nov 7, 2024
1 parent 27cb9ac commit 521c2d8
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
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
reportMissingImports = "none" # TODO
reportUndefinedVariable = "none" # TODO

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): ...
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

0 comments on commit 521c2d8

Please sign in to comment.