diff --git a/pyproject.toml b/pyproject.toml index 8bf3c26a..b9f24ec0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,6 @@ ignore = [ # TODO: Investigate and fix or configure "PYI051", # Request for autofix: https://github.com/astral-sh/ruff/issues/14185 - "UP043", # Manually simplify generator types first ### # Rules we don't want or don't agree with diff --git a/stubs/matplotlib/animation.pyi b/stubs/matplotlib/animation.pyi index 44cedb32..ff903070 100644 --- a/stubs/matplotlib/animation.pyi +++ b/stubs/matplotlib/animation.pyi @@ -39,7 +39,7 @@ class AbstractMovieWriter(abc.ABC): @abc.abstractmethod def finish(self) -> None: ... @contextlib.contextmanager - def saving(self, fig: Figure, outfile, dpi: float, *args, **kwargs) -> Generator[AbstractMovieWriter, None, None]: ... + def saving(self, fig: Figure, outfile, dpi: float, *args, **kwargs) -> Generator[AbstractMovieWriter]: ... class MovieWriter(AbstractMovieWriter): frame_format: str diff --git a/stubs/matplotlib/pyplot.pyi b/stubs/matplotlib/pyplot.pyi index 0370b6d0..faf873ae 100644 --- a/stubs/matplotlib/pyplot.pyi +++ b/stubs/matplotlib/pyplot.pyi @@ -779,7 +779,7 @@ def tick_params(axis: Literal["x", "y", "both"] = ..., **kwargs): ... def ticklabel_format( *, axis: Literal["x", "y", "both"] = ..., - style: Literal["sci", "scientific", "plain"] = ..., # noqa: F811 + style: Literal["sci", "scientific", "plain"] = ..., scilimits=..., useOffset: bool | float = ..., useLocale: bool = ..., diff --git a/stubs/sklearn/_config.pyi b/stubs/sklearn/_config.pyi index 2b0a128c..d630356a 100644 --- a/stubs/sklearn/_config.pyi +++ b/stubs/sklearn/_config.pyi @@ -33,4 +33,4 @@ def config_context( transform_output: None | str = None, enable_metadata_routing: None | bool = None, skip_parameter_validation: None | bool = None, -) -> Generator[None, None, None]: ... +) -> Generator[None]: ... diff --git a/stubs/sympy-stubs/assumptions/assume.pyi b/stubs/sympy-stubs/assumptions/assume.pyi index f214cf89..6afa48bf 100644 --- a/stubs/sympy-stubs/assumptions/assume.pyi +++ b/stubs/sympy-stubs/assumptions/assume.pyi @@ -53,4 +53,4 @@ class UndefinedPredicate(Predicate): def eval(self, args, assumptions=...) -> Any | None: ... @contextmanager -def assuming(*assumptions) -> Generator[None, Any, None]: ... +def assuming(*assumptions) -> Generator[None]: ... diff --git a/stubs/sympy-stubs/combinatorics/generators.pyi b/stubs/sympy-stubs/combinatorics/generators.pyi index c36cb79d..34ebb163 100644 --- a/stubs/sympy-stubs/combinatorics/generators.pyi +++ b/stubs/sympy-stubs/combinatorics/generators.pyi @@ -3,9 +3,9 @@ from typing import Any from sympy.combinatorics.permutations import Permutation -def symmetric(n) -> Generator[Permutation, Any, None]: ... -def cyclic(n) -> Generator[Permutation, Any, None]: ... -def alternating(n) -> Generator[Permutation, Any, None]: ... -def dihedral(n) -> Generator[Permutation, Any, None]: ... +def symmetric(n) -> Generator[Permutation]: ... +def cyclic(n) -> Generator[Permutation]: ... +def alternating(n) -> Generator[Permutation]: ... +def dihedral(n) -> Generator[Permutation]: ... def rubik_cube_generators() -> list[Permutation]: ... def rubik(n) -> list[Any]: ... diff --git a/stubs/sympy-stubs/combinatorics/graycode.pyi b/stubs/sympy-stubs/combinatorics/graycode.pyi index c0b75f81..027383cd 100644 --- a/stubs/sympy-stubs/combinatorics/graycode.pyi +++ b/stubs/sympy-stubs/combinatorics/graycode.pyi @@ -14,7 +14,7 @@ class GrayCode(Basic): def selections(self): ... @property def n(self) -> Basic: ... - def generate_gray(self, **hints) -> Generator[str, Any, None]: ... + def generate_gray(self, **hints) -> Generator[str]: ... def skip(self) -> None: ... @property def rank(self) -> int: ... @@ -27,4 +27,4 @@ def random_bitstring(n) -> str: ... def gray_to_bin(bin_list) -> LiteralString: ... def bin_to_gray(bin_list) -> LiteralString: ... def get_subset_from_bitstring(super_set, bitstring) -> list[Any]: ... -def graycode_subsets(gray_code_set) -> Generator[list[Any], Any, None]: ... +def graycode_subsets(gray_code_set) -> Generator[list[Any]]: ... diff --git a/stubs/sympy-stubs/combinatorics/perm_groups.pyi b/stubs/sympy-stubs/combinatorics/perm_groups.pyi index aeda5fcd..1fd4e8bf 100644 --- a/stubs/sympy-stubs/combinatorics/perm_groups.pyi +++ b/stubs/sympy-stubs/combinatorics/perm_groups.pyi @@ -51,11 +51,9 @@ class PermutationGroup(Basic): def derived_subgroup(self) -> PermutationGroup | None: ... def generate( self, method=..., af=... - ) -> ( - Generator[Any | Basic | list[Any] | Permutation, Any, None] | Generator[list[int] | Permutation | list[Any], Any, None] - ): ... - def generate_dimino(self, af=...) -> Generator[list[int] | Permutation | list[Any], Any, None]: ... - def generate_schreier_sims(self, af=...) -> Generator[Any | Basic | list[Any] | Permutation, Any, None]: ... + ) -> Generator[Any | Basic | list[Any] | Permutation] | Generator[list[int] | Permutation | list[Any]]: ... + def generate_dimino(self, af=...) -> Generator[list[int] | Permutation | list[Any]]: ... + def generate_schreier_sims(self, af=...) -> Generator[Any | Basic | list[Any] | Permutation]: ... @property def generators(self) -> list[Basic]: ... def contains(self, g, strict=...) -> bool: ... diff --git a/stubs/sympy-stubs/core/parameters.pyi b/stubs/sympy-stubs/core/parameters.pyi index 780e6c1a..167dc5ca 100644 --- a/stubs/sympy-stubs/core/parameters.pyi +++ b/stubs/sympy-stubs/core/parameters.pyi @@ -10,6 +10,6 @@ class _global_parameters(local): global_parameters = ... @contextmanager -def evaluate(x) -> Generator[None, Any, None]: ... +def evaluate(x) -> Generator[None]: ... @contextmanager -def distribute(x) -> Generator[None, Any, None]: ... +def distribute(x) -> Generator[None]: ... diff --git a/stubs/sympy-stubs/core/sorting.pyi b/stubs/sympy-stubs/core/sorting.pyi index 1fdbd159..76d78546 100644 --- a/stubs/sympy-stubs/core/sorting.pyi +++ b/stubs/sympy-stubs/core/sorting.pyi @@ -9,4 +9,4 @@ def default_sort_key( tuple[tuple[Literal[5], Literal[0], str], tuple[int, tuple[Any, ...]], Any, Any] | tuple[tuple[Literal[10, 0], Literal[0], str | Any], tuple[int, tuple[Any, ...]] | tuple[Literal[1], tuple[str]], Any, Any] ): ... -def ordered(seq, keys=..., default=..., warn=...) -> Generator[Any, Any, None]: ... +def ordered(seq, keys=..., default=..., warn=...) -> Generator[Any]: ... diff --git a/stubs/sympy-stubs/core/traversal.pyi b/stubs/sympy-stubs/core/traversal.pyi index f1d44024..56d89896 100644 --- a/stubs/sympy-stubs/core/traversal.pyi +++ b/stubs/sympy-stubs/core/traversal.pyi @@ -4,8 +4,8 @@ from typing_extensions import Self from sympy.core.basic import Basic -def iterargs(expr) -> Generator[Any, Any, None]: ... -def iterfreeargs(expr, _first=...) -> Generator[Any, Any, None]: ... +def iterargs(expr) -> Generator[Any]: ... +def iterfreeargs(expr, _first=...) -> Generator[Any]: ... class preorder_traversal: def __init__(self, node, keys=...) -> None: ... @@ -14,6 +14,6 @@ class preorder_traversal: def __iter__(self) -> Self: ... def use(expr, func, level=..., args=..., kwargs=...): ... -def walk(e, *target) -> Generator[Any, Any, None]: ... +def walk(e, *target) -> Generator[Any]: ... def bottom_up(rv, F, atoms=..., nonbasic=...): ... -def postorder_traversal(node, keys=...) -> Generator[Any | Basic, Any, None]: ... +def postorder_traversal(node, keys=...) -> Generator[Any | Basic]: ... diff --git a/stubs/sympy-stubs/logic/algorithms/dpll2.pyi b/stubs/sympy-stubs/logic/algorithms/dpll2.pyi index 1654c1d0..c45a49c8 100644 --- a/stubs/sympy-stubs/logic/algorithms/dpll2.pyi +++ b/stubs/sympy-stubs/logic/algorithms/dpll2.pyi @@ -3,7 +3,7 @@ from typing import Any, Literal def dpll_satisfiable( expr, all_models=... -) -> Generator[bool, None, None] | Generator[Any | Literal[False], Any, None] | dict[Any, Any] | Literal[False]: ... +) -> Generator[bool] | Generator[Any | Literal[False]] | dict[Any, Any] | Literal[False]: ... class SATSolver: def __init__( diff --git a/stubs/sympy-stubs/logic/algorithms/minisat22_wrapper.pyi b/stubs/sympy-stubs/logic/algorithms/minisat22_wrapper.pyi index d7f94995..b86df0c9 100644 --- a/stubs/sympy-stubs/logic/algorithms/minisat22_wrapper.pyi +++ b/stubs/sympy-stubs/logic/algorithms/minisat22_wrapper.pyi @@ -1,8 +1,6 @@ from collections.abc import Generator -from typing import Any, Literal, NoReturn +from typing import Any, Literal def minisat22_satisfiable( expr, all_models=..., minimal=... -) -> ( - Generator[bool, None, None] | dict[Any, Any] | Generator[dict[Any, Any] | Literal[False], Any, NoReturn] | Literal[False] -): ... +) -> Generator[bool] | Generator[dict[Any, Any] | Literal[False]] | dict[Any, Any] | Literal[False]: ... diff --git a/stubs/sympy-stubs/logic/algorithms/pycosat_wrapper.pyi b/stubs/sympy-stubs/logic/algorithms/pycosat_wrapper.pyi index af5b088b..95a90222 100644 --- a/stubs/sympy-stubs/logic/algorithms/pycosat_wrapper.pyi +++ b/stubs/sympy-stubs/logic/algorithms/pycosat_wrapper.pyi @@ -3,4 +3,4 @@ from typing import Any, Literal def pycosat_satisfiable( expr, all_models=... -) -> Generator[bool, None, None] | dict[Any, Any] | Generator[dict[Any, Any] | Literal[False], Any, None] | Literal[False]: ... +) -> Generator[bool] | dict[Any, Any] | Generator[dict[Any, Any] | Literal[False]] | Literal[False]: ... diff --git a/stubs/sympy-stubs/logic/boolalg.pyi b/stubs/sympy-stubs/logic/boolalg.pyi index 1a948364..43015908 100644 --- a/stubs/sympy-stubs/logic/boolalg.pyi +++ b/stubs/sympy-stubs/logic/boolalg.pyi @@ -187,7 +187,7 @@ integer_to_term = ... def truth_table( expr, variables, input=... -) -> Generator[tuple[list[Literal[0, 1]], Any | BooleanFunction] | Any | BooleanFunction, Any, None]: ... +) -> Generator[tuple[list[Literal[0, 1]], Any | BooleanFunction] | Any | BooleanFunction]: ... def SOPform(variables, minterms, dontcares=...) -> BooleanFalse | Or: ... def POSform(variables, minterms, dontcares=...) -> BooleanFalse | And: ... def ANFform(variables, truthvalues) -> BooleanFalse | Not | Xor: ... diff --git a/stubs/sympy-stubs/logic/inference.pyi b/stubs/sympy-stubs/logic/inference.pyi index d78d03c0..c98a3911 100644 --- a/stubs/sympy-stubs/logic/inference.pyi +++ b/stubs/sympy-stubs/logic/inference.pyi @@ -1,15 +1,14 @@ from collections.abc import Generator -from typing import Any, Literal, NoReturn +from typing import Any, Literal def literal_symbol(literal) -> bool: ... def satisfiable( expr, algorithm=..., all_models=..., minimal=... ) -> ( dict[Any, Any] - | Generator[bool, None, None] - | Generator[Any | Literal[False], Any, None] - | Generator[dict[Any, Any] | Literal[False], Any, None] - | Generator[dict[Any, Any] | Literal[False], Any, NoReturn] + | Generator[bool] + | Generator[Any | Literal[False]] + | Generator[dict[Any, Any] | Literal[False]] | Literal[False] ): ... def valid(expr) -> bool: ... diff --git a/stubs/sympy-stubs/matrices/utilities.pyi b/stubs/sympy-stubs/matrices/utilities.pyi index 9db7f785..6c7d17c5 100644 --- a/stubs/sympy-stubs/matrices/utilities.pyi +++ b/stubs/sympy-stubs/matrices/utilities.pyi @@ -9,4 +9,4 @@ class DotProdSimpState(local): _dotprodsimp_state = ... @contextmanager -def dotprodsimp(x) -> Generator[None, Any, None]: ... +def dotprodsimp(x) -> Generator[None]: ... diff --git a/stubs/sympy-stubs/multipledispatch/dispatcher.pyi b/stubs/sympy-stubs/multipledispatch/dispatcher.pyi index f409bd67..519f7edf 100644 --- a/stubs/sympy-stubs/multipledispatch/dispatcher.pyi +++ b/stubs/sympy-stubs/multipledispatch/dispatcher.pyi @@ -34,7 +34,7 @@ class Dispatcher: __repr__ = ... def dispatch(self, *types) -> None: ... - def dispatch_iter(self, *types) -> Generator[Any, Any, None]: ... + def dispatch_iter(self, *types) -> Generator[Any]: ... def resolve(self, types) -> None: ... def __getstate__(self) -> dict[str, Any]: ... def __setstate__(self, d) -> None: ... diff --git a/stubs/sympy-stubs/ntheory/continued_fraction.pyi b/stubs/sympy-stubs/ntheory/continued_fraction.pyi index 17fee886..65a0c817 100644 --- a/stubs/sympy-stubs/ntheory/continued_fraction.pyi +++ b/stubs/sympy-stubs/ntheory/continued_fraction.pyi @@ -10,5 +10,5 @@ from sympy.series.order import Order def continued_fraction(a) -> list: ... def continued_fraction_periodic(p, q, d=..., s=...) -> list: ... def continued_fraction_reduce(cf) -> Order | Basic | Any | Add | Mul: ... -def continued_fraction_iterator(x) -> Generator[type[UndefinedFunction] | Any, Any, None]: ... -def continued_fraction_convergents(cf) -> Generator[Any, Any, None]: ... +def continued_fraction_iterator(x) -> Generator[type[UndefinedFunction] | Any]: ... +def continued_fraction_convergents(cf) -> Generator[Any]: ... diff --git a/stubs/sympy-stubs/ntheory/factor_.pyi b/stubs/sympy-stubs/ntheory/factor_.pyi index a8af3a33..64bf679a 100644 --- a/stubs/sympy-stubs/ntheory/factor_.pyi +++ b/stubs/sympy-stubs/ntheory/factor_.pyi @@ -35,17 +35,13 @@ def factorrat( rat, limit=..., use_trial=..., use_rho=..., use_pm1=..., verbose=..., visual=..., multiple=... ) -> list[Any] | dict[Any, int] | Order: ... def primefactors(n, limit=..., verbose=...) -> list[Any]: ... -def divisors( - n, generator=..., proper=... -) -> list[int] | list[Any] | list[Any | Literal[1]] | Generator[Any | Literal[1], Any, None]: ... +def divisors(n, generator=..., proper=...) -> list[int] | list[Any] | list[Any | Literal[1]] | Generator[Any | Literal[1]]: ... def divisor_count(n, modulus=..., proper=...) -> Order | Literal[0]: ... -def proper_divisors( - n, generator=... -) -> list[int] | list[Any] | list[Any | Literal[1]] | Generator[Any | Literal[1], Any, None]: ... +def proper_divisors(n, generator=...) -> list[int] | list[Any] | list[Any | Literal[1]] | Generator[Any | Literal[1]]: ... def proper_divisor_count(n, modulus=...) -> Order | Literal[0]: ... -def udivisors(n, generator=...) -> list[int] | list[Any] | list[Any | Literal[1]] | Generator[Any | Literal[1], Any, None]: ... +def udivisors(n, generator=...) -> list[int] | list[Any] | list[Any | Literal[1]] | Generator[Any | Literal[1]]: ... def udivisor_count(n) -> Any | Literal[0]: ... -def antidivisors(n, generator=...) -> list[Any] | list[Any | int] | Generator[Any | int, Any, None]: ... +def antidivisors(n, generator=...) -> list[Any] | list[Any | int] | Generator[Any | int]: ... def antidivisor_count(n) -> Literal[0]: ... class totient(Function): diff --git a/stubs/sympy-stubs/ntheory/generate.pyi b/stubs/sympy-stubs/ntheory/generate.pyi index 22a453ed..56890e77 100644 --- a/stubs/sympy-stubs/ntheory/generate.pyi +++ b/stubs/sympy-stubs/ntheory/generate.pyi @@ -10,9 +10,9 @@ class Sieve: def __init__(self) -> None: ... def extend(self, n) -> None: ... def extend_to_no(self, i) -> None: ... - def primerange(self, a, b=...) -> Generator[Any, Any, None]: ... - def totientrange(self, a, b) -> Generator[int, Any, None]: ... - def mobiusrange(self, a, b) -> Generator[int, Any, None]: ... + def primerange(self, a, b=...) -> Generator[Any]: ... + def totientrange(self, a, b) -> Generator[int]: ... + def mobiusrange(self, a, b) -> Generator[int]: ... def search(self, n) -> tuple[int, int]: ... def __contains__(self, n) -> bool: ... def __iter__(self) -> Iterator[array[int] | int]: ... @@ -28,9 +28,9 @@ class primepi(Function): def nextprime(n, ith=...) -> int | array[int] | None: ... def prevprime(n) -> int | array[int] | None: ... -def primerange(a, b=...) -> Generator[Any | int | array[int] | None, Any, None]: ... +def primerange(a, b=...) -> Generator[Any | int | array[int] | None]: ... def randprime(a, b) -> int | array[int] | None: ... def primorial(n, nth=...) -> array[int] | int: ... -def cycle_length(f, x0, nmax=..., values=...) -> Generator[Any | tuple[int, None] | tuple[int, int], Any, None]: ... +def cycle_length(f, x0, nmax=..., values=...) -> Generator[Any | tuple[int, None] | tuple[int, int]]: ... def composite(nth) -> int: ... def compositepi(n) -> Literal[0]: ... diff --git a/stubs/sympy-stubs/ntheory/multinomial.pyi b/stubs/sympy-stubs/ntheory/multinomial.pyi index b05ada51..901d0190 100644 --- a/stubs/sympy-stubs/ntheory/multinomial.pyi +++ b/stubs/sympy-stubs/ntheory/multinomial.pyi @@ -12,4 +12,4 @@ def multinomial_coefficients( | dict[tuple[Any, ...], Any] | dict[tuple[int, ...], int] ): ... -def multinomial_coefficients_iterator(m, n, _tuple=...) -> Generator[Any | tuple[tuple[Any, ...], Any], Any, None]: ... +def multinomial_coefficients_iterator(m, n, _tuple=...) -> Generator[Any | tuple[tuple[Any, ...], Any]]: ... diff --git a/stubs/sympy-stubs/ntheory/residue_ntheory.pyi b/stubs/sympy-stubs/ntheory/residue_ntheory.pyi index 7a59366e..62026061 100644 --- a/stubs/sympy-stubs/ntheory/residue_ntheory.pyi +++ b/stubs/sympy-stubs/ntheory/residue_ntheory.pyi @@ -9,7 +9,7 @@ def n_order(a, n) -> Literal[1]: ... def primitive_root(p) -> int | None: ... def is_primitive_root(a, p) -> bool: ... def sqrt_mod(a, p, all_roots=...) -> list[Any | int] | Any | int | None: ... -def sqrt_mod_iter(a, p, domain=...) -> Generator[Any | int, Any, None]: ... +def sqrt_mod_iter(a, p, domain=...) -> Generator[Any | int]: ... def is_quad_residue(a, p) -> bool: ... def is_nthpow_residue(a, n, m) -> bool: ... def nthroot_mod(a, n, p, all_roots=...) -> list[Any | int] | Any | int | list[Any] | list[int] | list[int | Any] | None: ... diff --git a/stubs/sympy-stubs/plotting/pygletplot/plot_interval.pyi b/stubs/sympy-stubs/plotting/pygletplot/plot_interval.pyi index acc8754b..17911c26 100644 --- a/stubs/sympy-stubs/plotting/pygletplot/plot_interval.pyi +++ b/stubs/sympy-stubs/plotting/pygletplot/plot_interval.pyi @@ -30,7 +30,7 @@ class PlotInterval: @require_all_args def assert_complete(self) -> None: ... @require_all_args - def vrange(self) -> Generator[Any, Any, None]: ... + def vrange(self) -> Generator[Any]: ... @require_all_args - def vrange2(self) -> Generator[tuple[Any, Any], Any, None]: ... - def frange(self) -> Generator[float, Any, None]: ... + def vrange2(self) -> Generator[tuple[Any, Any]]: ... + def frange(self) -> Generator[float]: ... diff --git a/stubs/sympy-stubs/plotting/textplot.pyi b/stubs/sympy-stubs/plotting/textplot.pyi index 98827d4c..57e00757 100644 --- a/stubs/sympy-stubs/plotting/textplot.pyi +++ b/stubs/sympy-stubs/plotting/textplot.pyi @@ -4,5 +4,5 @@ from typing import Any def is_valid(x) -> bool: ... def rescale(y, W, H, mi, ma) -> list[Any]: ... def linspace(start, stop, num) -> list[Any]: ... -def textplot_str(expr, a, b, W=..., H=...) -> Generator[str, Any, None]: ... +def textplot_str(expr, a, b, W=..., H=...) -> Generator[str]: ... def textplot(expr, a, b, W=..., H=...) -> None: ... diff --git a/stubs/sympy-stubs/polys/agca/ideals.pyi b/stubs/sympy-stubs/polys/agca/ideals.pyi index e9064e6c..54e42674 100644 --- a/stubs/sympy-stubs/polys/agca/ideals.pyi +++ b/stubs/sympy-stubs/polys/agca/ideals.pyi @@ -42,7 +42,7 @@ class Ideal(IntegerPowerable): class ModuleImplementedIdeal(Ideal): def __init__(self, ring, module) -> None: ... @property - def gens(self) -> Generator[Any, None, None]: ... + def gens(self) -> Generator[Any]: ... def is_zero(self): ... def is_whole_ring(self): ... def __repr__(self) -> LiteralString: ... diff --git a/stubs/sympy-stubs/polys/monomials.pyi b/stubs/sympy-stubs/polys/monomials.pyi index 808b10fe..1c2f8ffc 100644 --- a/stubs/sympy-stubs/polys/monomials.pyi +++ b/stubs/sympy-stubs/polys/monomials.pyi @@ -7,7 +7,7 @@ from sympy.series.order import Order from sympy.utilities import public @public -def itermonomials(variables, max_degrees, min_degrees=...) -> Generator[Any | Order, Any, None]: ... +def itermonomials(variables, max_degrees, min_degrees=...) -> Generator[Any | Order]: ... def monomial_count(V, N): ... def monomial_mul(A, B) -> tuple[Any, ...]: ... def monomial_div(A, B) -> tuple[Any, ...] | None: ... diff --git a/stubs/sympy-stubs/polys/polyconfig.pyi b/stubs/sympy-stubs/polys/polyconfig.pyi index 3850879d..726afea7 100644 --- a/stubs/sympy-stubs/polys/polyconfig.pyi +++ b/stubs/sympy-stubs/polys/polyconfig.pyi @@ -6,7 +6,7 @@ _default_config = ... _current_config = ... @contextmanager -def using(**kwargs) -> Generator[None, Any, None]: ... +def using(**kwargs) -> Generator[None]: ... def setup(key, value=...) -> None: ... def query(key): ... def configure() -> None: ... diff --git a/stubs/sympy-stubs/printing/printer.pyi b/stubs/sympy-stubs/printing/printer.pyi index 9d347fa5..8202953e 100644 --- a/stubs/sympy-stubs/printing/printer.pyi +++ b/stubs/sympy-stubs/printing/printer.pyi @@ -4,7 +4,7 @@ from contextlib import contextmanager from typing import Any, Callable @contextmanager -def printer_context(printer, **kwargs) -> Generator[None, Any, None]: ... +def printer_context(printer, **kwargs) -> Generator[None]: ... class Printer: _global_settings: dict[str, Any] = ... diff --git a/stubs/sympy-stubs/series/approximants.pyi b/stubs/sympy-stubs/series/approximants.pyi index 4a0210f2..623176b0 100644 --- a/stubs/sympy-stubs/series/approximants.pyi +++ b/stubs/sympy-stubs/series/approximants.pyi @@ -4,4 +4,4 @@ from typing import Any from sympy.utilities import public @public -def approximants(l, X=..., simplify=...) -> Generator[Any, Any, None]: ... +def approximants(l, X=..., simplify=...) -> Generator[Any]: ... diff --git a/stubs/sympy-stubs/series/formal.pyi b/stubs/sympy-stubs/series/formal.pyi index 2f762d6b..ebc33d15 100644 --- a/stubs/sympy-stubs/series/formal.pyi +++ b/stubs/sympy-stubs/series/formal.pyi @@ -14,7 +14,7 @@ from sympy.sets.sets import FiniteSet, Interval def rational_algorithm(f, x, k, order=..., full=...) -> tuple[Any, Any, int] | None: ... def rational_independent(terms, x) -> list[Any]: ... -def simpleDE(f, x, g, order=...) -> Generator[tuple[Any, int], Any, None]: ... +def simpleDE(f, x, g, order=...) -> Generator[tuple[Any, int]]: ... def exp_re(DE, r, k): ... def hyper_re(DE, r, k): ... def rsolve_hypergeometric( @@ -71,13 +71,13 @@ class FormalPowerSeries(SeriesBase): @property def infinite(self): ... def polynomial(self, n=...) -> Order: ... - def truncate(self, n=...) -> Generator[Any, Any, None]: ... + def truncate(self, n=...) -> Generator[Any]: ... def zero_coeff(self): ... def integrate(self, x=..., **kwargs) -> Equality | Relational | Ne | Self: ... - def product(self, other, x=..., n=...) -> Generator[Any, Any, None] | FormalPowerSeriesProduct: ... + def product(self, other, x=..., n=...) -> Generator[Any] | FormalPowerSeriesProduct: ... def coeff_bell(self, n) -> SeqPer | SeqFormula: ... - def compose(self, other, x=..., n=...) -> Generator[Any, Any, None] | FormalPowerSeriesCompose: ... - def inverse(self, x=..., n=...) -> Generator[Any, Any, None] | FormalPowerSeriesInverse: ... + def compose(self, other, x=..., n=...) -> Generator[Any] | FormalPowerSeriesCompose: ... + def inverse(self, x=..., n=...) -> Generator[Any] | FormalPowerSeriesInverse: ... def __add__(self, other) -> Self | Order: ... def __radd__(self, other) -> Self | Order: ... def __neg__(self) -> Self: ... diff --git a/stubs/sympy-stubs/series/fourier.pyi b/stubs/sympy-stubs/series/fourier.pyi index 411adfcf..9a97b67a 100644 --- a/stubs/sympy-stubs/series/fourier.pyi +++ b/stubs/sympy-stubs/series/fourier.pyi @@ -36,7 +36,7 @@ class FourierSeries(SeriesBase): def length(self): ... @property def L(self): ... - def truncate(self, n=...) -> Generator[Any, Any, None] | Order: ... + def truncate(self, n=...) -> Generator[Any] | Order: ... def sigma_approximation(self, n=...) -> Order: ... def shift(self, s) -> Self: ... def shiftx(self, s) -> Self: ... diff --git a/stubs/sympy-stubs/solvers/diophantine/diophantine.pyi b/stubs/sympy-stubs/solvers/diophantine/diophantine.pyi index 156fe085..343bee52 100644 --- a/stubs/sympy-stubs/solvers/diophantine/diophantine.pyi +++ b/stubs/sympy-stubs/solvers/diophantine/diophantine.pyi @@ -20,7 +20,7 @@ class DiophantineSolutionSet(set): def __init__(self, symbols_seq, parameters) -> None: ... def add(self, solution) -> None: ... def update(self, *solutions) -> None: ... - def dict_iterator(self) -> Generator[dict[Any, Any], Any, None]: ... + def dict_iterator(self) -> Generator[dict[Any, Any]]: ... def subs(self, *args, **kwargs) -> DiophantineSolutionSet: ... def __call__(self, *args) -> DiophantineSolutionSet: ... @@ -166,7 +166,7 @@ def holzer(x, y, z, a, b, c) -> tuple[int, ...]: ... def diop_general_pythagorean(eq, param=...) -> None: ... def diop_general_sum_of_squares(eq, limit=...) -> set[Any] | None: ... def diop_general_sum_of_even_powers(eq, limit=...) -> set[Any] | None: ... -def partition(n, k=..., zeros=...) -> Generator[tuple[Any, ...] | Any, Any, None]: ... +def partition(n, k=..., zeros=...) -> Generator[tuple[Any, ...] | Any]: ... def prime_as_sum_of_two_squares(p) -> tuple[int, int] | None: ... def sum_of_three_squares( n, @@ -174,11 +174,11 @@ def sum_of_three_squares( def sum_of_four_squares(n) -> tuple[Literal[0], Literal[0], Literal[0], Literal[0]] | tuple[Any, ...]: ... def power_representation( n, p, k, zeros=... -) -> Generator[tuple[Any, ...] | tuple[Literal[0], ...] | tuple[int] | tuple[Any] | tuple[int, int] | None, Any, None]: ... +) -> Generator[tuple[Any, ...] | tuple[Literal[0], ...] | tuple[int] | tuple[Any] | tuple[int, int] | None]: ... sum_of_powers = ... -def pow_rep_recursive(n_i, k, n_remaining, terms, p) -> Generator[tuple[Any, ...] | Any, Any, None]: ... +def pow_rep_recursive(n_i, k, n_remaining, terms, p) -> Generator[tuple[Any, ...] | Any]: ... def sum_of_squares( n, k, zeros=... -) -> Generator[tuple[Any, ...] | tuple[Literal[0], ...] | tuple[int] | tuple[Any] | tuple[int, int] | None, Any, None]: ... +) -> Generator[tuple[Any, ...] | tuple[Literal[0], ...] | tuple[int] | tuple[Any] | tuple[int, int] | None]: ... diff --git a/stubs/sympy-stubs/stats/rv.pyi b/stubs/sympy-stubs/stats/rv.pyi index a15ef3b5..a66c50cd 100644 --- a/stubs/sympy-stubs/stats/rv.pyi +++ b/stubs/sympy-stubs/stats/rv.pyi @@ -214,13 +214,13 @@ def sample( def quantile(expr, evaluate=..., **kwargs) -> Lambda | Any: ... def sample_iter( expr, condition=..., size=..., library=..., numsamples=..., seed=..., **kwargs -) -> Generator[Any, Any, None] | Generator[Any | JointRandomSymbol | Basic, Any, None]: ... +) -> Generator[Any] | Generator[Any | JointRandomSymbol | Basic]: ... def sample_iter_lambdify( expr, condition=..., size=..., numsamples=..., seed=..., **kwargs -) -> Generator[Any, Any, None] | Generator[Any | JointRandomSymbol | Basic, Any, None]: ... +) -> Generator[Any] | Generator[Any | JointRandomSymbol | Basic]: ... def sample_iter_subs( expr, condition=..., size=..., numsamples=..., seed=..., **kwargs -) -> Generator[Any, Any, None] | Generator[Any | JointRandomSymbol | Basic, Any, None]: ... +) -> Generator[Any] | Generator[Any | JointRandomSymbol | Basic]: ... def sampling_P(condition, given_condition=..., library=..., numsamples=..., evalf=..., seed=..., **kwargs): ... def sampling_E(expr, given_condition=..., library=..., numsamples=..., evalf=..., seed=..., **kwargs): ... def sampling_density(expr, given_condition=..., library=..., numsamples=..., seed=..., **kwargs) -> dict[Any, Any]: ... diff --git a/stubs/sympy-stubs/stats/stochastic_process_types.pyi b/stubs/sympy-stubs/stats/stochastic_process_types.pyi index 5fd280f3..fe145df4 100644 --- a/stubs/sympy-stubs/stats/stochastic_process_types.pyi +++ b/stubs/sympy-stubs/stats/stochastic_process_types.pyi @@ -106,7 +106,7 @@ class DiscreteMarkovChain(DiscreteTimeStochasticProcess, MarkovProcess): def limiting_distribution(self) -> ImmutableMatrix | ConditionSet | Lambda: ... def decompose(self) -> tuple[list[Basic], ImmutableMatrix, ImmutableMatrix, ImmutableMatrix]: ... def canonical_form(self) -> tuple[list[Basic], ImmutableMatrix]: ... - def sample(self) -> Generator[Basic, Any, None]: ... + def sample(self) -> Generator[Basic]: ... class ContinuousMarkovChain(ContinuousTimeStochasticProcess, MarkovProcess): index_set = ... diff --git a/stubs/sympy-stubs/strategies/branch/core.pyi b/stubs/sympy-stubs/strategies/branch/core.pyi index 60729f49..0816aee3 100644 --- a/stubs/sympy-stubs/strategies/branch/core.pyi +++ b/stubs/sympy-stubs/strategies/branch/core.pyi @@ -1,14 +1,14 @@ from collections.abc import Generator from typing import Any, Callable -def identity(x) -> Generator[Any, Any, None]: ... -def exhaust(brule) -> Callable[..., Generator[Any, Any, None]]: ... -def onaction(brule, fn) -> Callable[..., Generator[Any, Any, None]]: ... -def debug(brule, file=...) -> Callable[..., Generator[Any, Any, None]]: ... -def multiplex(*brules) -> Callable[..., Generator[Any, Any, None]]: ... -def condition(cond, brule) -> Callable[..., Generator[Any, Any, None]]: ... -def sfilter(pred, brule) -> Callable[..., Generator[Any, Any, None]]: ... -def notempty(brule) -> Callable[..., Generator[Any, Any, None]]: ... -def do_one(*brules) -> Callable[..., Generator[Any, Any, None]]: ... -def chain(*brules) -> Callable[..., Generator[Any, Any, None]]: ... -def yieldify(rl) -> Callable[..., Generator[Any, Any, None]]: ... +def identity(x) -> Generator[Any]: ... +def exhaust(brule) -> Callable[..., Generator[Any]]: ... +def onaction(brule, fn) -> Callable[..., Generator[Any]]: ... +def debug(brule, file=...) -> Callable[..., Generator[Any]]: ... +def multiplex(*brules) -> Callable[..., Generator[Any]]: ... +def condition(cond, brule) -> Callable[..., Generator[Any]]: ... +def sfilter(pred, brule) -> Callable[..., Generator[Any]]: ... +def notempty(brule) -> Callable[..., Generator[Any]]: ... +def do_one(*brules) -> Callable[..., Generator[Any]]: ... +def chain(*brules) -> Callable[..., Generator[Any]]: ... +def yieldify(rl) -> Callable[..., Generator[Any]]: ... diff --git a/stubs/sympy-stubs/strategies/branch/tools.pyi b/stubs/sympy-stubs/strategies/branch/tools.pyi index b9472008..342690b6 100644 --- a/stubs/sympy-stubs/strategies/branch/tools.pyi +++ b/stubs/sympy-stubs/strategies/branch/tools.pyi @@ -1,4 +1,4 @@ from collections.abc import Generator from typing import Any, Callable -def canon(*rules) -> Callable[..., Generator[Any, Any, None]]: ... +def canon(*rules) -> Callable[..., Generator[Any]]: ... diff --git a/stubs/sympy-stubs/strategies/branch/traverse.pyi b/stubs/sympy-stubs/strategies/branch/traverse.pyi index 74f4403a..1a7d9722 100644 --- a/stubs/sympy-stubs/strategies/branch/traverse.pyi +++ b/stubs/sympy-stubs/strategies/branch/traverse.pyi @@ -1,5 +1,5 @@ from collections.abc import Generator from typing import Any, Callable -def top_down(brule, fns=...) -> Callable[..., Generator[Any, Any, None]]: ... -def sall(brule, fns=...) -> Callable[..., Generator[Any, Any, None]]: ... +def top_down(brule, fns=...) -> Callable[..., Generator[Any]]: ... +def sall(brule, fns=...) -> Callable[..., Generator[Any]]: ... diff --git a/stubs/sympy-stubs/tensor/tensor.pyi b/stubs/sympy-stubs/tensor/tensor.pyi index a8821c49..2dc057a2 100644 --- a/stubs/sympy-stubs/tensor/tensor.pyi +++ b/stubs/sympy-stubs/tensor/tensor.pyi @@ -199,7 +199,7 @@ class TensorHead(Basic): def data(self, data) -> None: ... @data.deleter def data(self) -> None: ... - def __iter__(self) -> Generator[Any, Any, None] | Any: ... + def __iter__(self) -> Generator[Any] | Any: ... def tensor_heads(s, index_types, symmetry=..., comm=...) -> TensorHead | list[TensorHead]: ... @@ -325,7 +325,7 @@ class Tensor(TensExpr): def as_base_exp(self) -> tuple[Self, Any]: ... def substitute_indices(self, *index_tuples) -> TensExpr: ... def __call__(self, *indices) -> Self | TensExpr: ... - def __iter__(self) -> Generator[Any, Any, None] | Any: ... + def __iter__(self) -> Generator[Any] | Any: ... def __getitem__(self, item) -> Any | ArrayElement | Indexed | ImmutableDenseNDimArray | Basic: ... @property def data( @@ -390,7 +390,7 @@ class TensMul(TensExpr, AssocOp): def data(self, data): ... @data.deleter def data(self): ... - def __iter__(self) -> Generator[Any, Any, None] | Any: ... + def __iter__(self) -> Generator[Any] | Any: ... class TensorElement(TensExpr): def __new__(cls, expr, index_map) -> TensExpr | Tensor | Self: ... diff --git a/stubs/sympy-stubs/testing/runtests.pyi b/stubs/sympy-stubs/testing/runtests.pyi index c64ddc9d..3e823e33 100644 --- a/stubs/sympy-stubs/testing/runtests.pyi +++ b/stubs/sympy-stubs/testing/runtests.pyi @@ -18,7 +18,7 @@ def convert_to_native_paths(lst) -> list[Any]: ... def get_sympy_dir() -> str: ... def setup_pprint() -> bool: ... @contextmanager -def raise_on_deprecated() -> Generator[None, Any, None]: ... +def raise_on_deprecated() -> Generator[None]: ... def run_in_subprocess_with_hash_randomization( function, function_args=..., function_kwargs=..., command=..., module=..., force=... ) -> int | Any | Literal[False]: ... diff --git a/stubs/sympy-stubs/unify/core.pyi b/stubs/sympy-stubs/unify/core.pyi index a287b30d..cb26422d 100644 --- a/stubs/sympy-stubs/unify/core.pyi +++ b/stubs/sympy-stubs/unify/core.pyi @@ -16,14 +16,12 @@ class CondVariable: def __eq__(self, other) -> bool: ... def __hash__(self) -> int: ... -def unify(x, y, s=..., **fns) -> Generator[Any | dict[Any, Any], Any, None]: ... -def unify_var(var, x, s, **fns) -> Generator[Any, Any, None]: ... +def unify(x, y, s=..., **fns) -> Generator[Any | dict[Any, Any]]: ... +def unify_var(var, x, s, **fns) -> Generator[Any]: ... def occur_check(var, x) -> bool: ... def assoc(d, key, val): ... def is_args(x) -> bool: ... def unpack(x) -> Compound: ... -def allcombinations( - A, B, ordered -) -> Generator[tuple[tuple[tuple[Any], ...], Any] | tuple[Any, tuple[tuple[Any], ...]], Any, None]: ... +def allcombinations(A, B, ordered) -> Generator[tuple[tuple[tuple[Any], ...], Any] | tuple[Any, tuple[tuple[Any], ...]]]: ... def partition(it, part) -> Any: ... def index(it, ind) -> Any: ... diff --git a/stubs/sympy-stubs/unify/rewrite.pyi b/stubs/sympy-stubs/unify/rewrite.pyi index 18f3cea2..14c3d208 100644 --- a/stubs/sympy-stubs/unify/rewrite.pyi +++ b/stubs/sympy-stubs/unify/rewrite.pyi @@ -3,4 +3,4 @@ from typing import Any, Callable from sympy import Basic -def rewriterule(source, target, variables=..., condition=..., assume=...) -> Callable[..., Generator[Any | Basic, Any, None]]: ... +def rewriterule(source, target, variables=..., condition=..., assume=...) -> Callable[..., Generator[Any | Basic]]: ... diff --git a/stubs/sympy-stubs/unify/usympy.pyi b/stubs/sympy-stubs/unify/usympy.pyi index ce9e98e6..d87588e1 100644 --- a/stubs/sympy-stubs/unify/usympy.pyi +++ b/stubs/sympy-stubs/unify/usympy.pyi @@ -16,4 +16,4 @@ def mk_matchtype(typ) -> Callable[..., bool]: ... def deconstruct(s, variables=...) -> Variable | CondVariable | Basic | Compound: ... def construct(t) -> Any: ... def rebuild(s) -> Any | Basic: ... -def unify(x, y, s=..., variables=..., **kwargs) -> Generator[dict[Any, Any], Any, None]: ... +def unify(x, y, s=..., variables=..., **kwargs) -> Generator[dict[Any, Any]]: ... diff --git a/stubs/sympy-stubs/utilities/enumerative.pyi b/stubs/sympy-stubs/utilities/enumerative.pyi index a5325afa..f7642d4c 100644 --- a/stubs/sympy-stubs/utilities/enumerative.pyi +++ b/stubs/sympy-stubs/utilities/enumerative.pyi @@ -7,7 +7,7 @@ class PartComponent: def __eq__(self, other) -> bool: ... def __ne__(self, other) -> bool: ... -def multiset_partitions_taocp(multiplicities) -> Generator[list[Any], Any, None]: ... +def multiset_partitions_taocp(multiplicities) -> Generator[list[Any]]: ... def factoring_visitor(state, primes) -> list[Any]: ... def list_visitor(state, components) -> list[Any]: ... @@ -20,10 +20,10 @@ class MultisetPartitionTraverser: def decrement_part_range(self, part, lb, ub) -> bool | None: ... def spread_part_multiplicity(self) -> bool: ... def top_part(self) -> list[PartComponent]: ... - def enum_all(self, multiplicities) -> Generator[list[Any], Any, None]: ... - def enum_small(self, multiplicities, ub) -> Generator[list[Any], Any, None]: ... - def enum_large(self, multiplicities, lb) -> Generator[list[Any], Any, None]: ... - def enum_range(self, multiplicities, lb, ub) -> Generator[list[Any], Any, None]: ... + def enum_all(self, multiplicities) -> Generator[list[Any]]: ... + def enum_small(self, multiplicities, ub) -> Generator[list[Any]]: ... + def enum_large(self, multiplicities, lb) -> Generator[list[Any]]: ... + def enum_range(self, multiplicities, lb, ub) -> Generator[list[Any]]: ... def count_partitions_slow(self, multiplicities) -> int: ... def count_partitions(self, multiplicities) -> int: ... diff --git a/stubs/sympy-stubs/utilities/exceptions.pyi b/stubs/sympy-stubs/utilities/exceptions.pyi index 8d03b137..5a0f2a09 100644 --- a/stubs/sympy-stubs/utilities/exceptions.pyi +++ b/stubs/sympy-stubs/utilities/exceptions.pyi @@ -10,4 +10,4 @@ class SymPyDeprecationWarning(DeprecationWarning): def sympy_deprecation_warning(message, *, deprecated_since_version, active_deprecations_target, stacklevel=...) -> None: ... @contextlib.contextmanager -def ignore_warnings(warningcls) -> Generator[None, Any, None]: ... +def ignore_warnings(warningcls) -> Generator[None]: ... diff --git a/stubs/sympy-stubs/utilities/iterables.pyi b/stubs/sympy-stubs/utilities/iterables.pyi index 02ed6bf3..4ce380ad 100644 --- a/stubs/sympy-stubs/utilities/iterables.pyi +++ b/stubs/sympy-stubs/utilities/iterables.pyi @@ -13,24 +13,16 @@ def flatten(iterable, levels=..., cls=...) -> list[Any]: ... def unflatten(iter, n=...) -> list[Any]: ... def reshape(seq, how) -> Any: ... def group(seq, multiple=...) -> list[list[Any]] | list[tuple[Any, int]]: ... -def iproduct(*iterables) -> Generator[tuple[()] | tuple[Any] | tuple[Any, Any] | Any, Any, None]: ... +def iproduct(*iterables) -> Generator[tuple[()] | tuple[Any] | tuple[Any, Any] | Any]: ... def multiset(seq) -> dict[Any, int]: ... def ibin( n, bits=..., str=... -) -> ( - list[int] - | Iterator[Never] - | permutations[Any] - | Iterator[tuple[()]] - | product[tuple[Any, ...]] - | str - | Generator[str, None, None] -): ... +) -> list[int] | Iterator[Never] | permutations[Any] | Iterator[tuple[()]] | product[tuple[Any, ...]] | str | Generator[str]: ... def variations( seq, n, repetition=... ) -> Iterator[Never] | permutations[Any] | Iterator[tuple[()]] | product[tuple[Any, ...]]: ... def subsets(seq, k=..., repetition=...) -> chain[tuple[Any, ...]] | combinations[Any] | combinations_with_replacement[Any]: ... -def filter_symbols(iterator, exclude) -> Generator[Any, Any, None]: ... +def filter_symbols(iterator, exclude) -> Generator[Any]: ... def numbered_symbols( prefix=..., cls=..., start=..., exclude=..., *args, **assumptions ) -> Generator[Symbol | Any, Any, NoReturn]: ... @@ -40,56 +32,50 @@ def take(iter, n) -> list[Any]: ... def dict_merge(*dicts) -> dict[Any, Any]: ... def common_prefix(*seqs) -> list[Any]: ... def common_suffix(*seqs) -> list[Any]: ... -def prefixes(seq) -> Generator[Any, Any, None]: ... -def postfixes(seq) -> Generator[Any, Any, None]: ... +def prefixes(seq) -> Generator[Any]: ... +def postfixes(seq) -> Generator[Any]: ... def topological_sort(graph, key=...) -> list[Any]: ... def strongly_connected_components(G) -> list[Any]: ... def connected_components(G) -> list[Any]: ... def rotate_left(x, y) -> list[Any]: ... def rotate_right(x, y) -> list[Any]: ... def least_rotation(x, key=...) -> int: ... -def multiset_combinations(m, n, g=...) -> Generator[Any | list[Any], Any, None]: ... -def multiset_permutations(m, size=..., g=...) -> Generator[list[Any | int] | Any, Any, None]: ... -def multiset_partitions( - multiset, m=... -) -> Generator[list[list[int]] | list[list[Any]] | list[list[str] | Any] | list[Any], Any, None]: ... +def multiset_combinations(m, n, g=...) -> Generator[Any | list[Any]]: ... +def multiset_permutations(m, size=..., g=...) -> Generator[list[Any | int] | Any]: ... +def multiset_partitions(multiset, m=...) -> Generator[list[list[int]] | list[list[Any]] | list[list[str] | Any] | list[Any]]: ... def partitions( n, m=..., k=..., size=... -) -> Generator[tuple[Literal[0], dict[Any, Any]] | tuple[int, dict[int, int]] | dict[int, int], Any, None]: ... -def ordered_partitions(n, m=..., sort=...) -> Generator[Any | list[Any], Any, None]: ... -def binary_partitions(n) -> Generator[Any | list[Any], Any, None]: ... +) -> Generator[tuple[Literal[0], dict[Any, Any]] | tuple[int, dict[int, int]] | dict[int, int]]: ... +def ordered_partitions(n, m=..., sort=...) -> Generator[Any | list[Any]]: ... +def binary_partitions(n) -> Generator[Any | list[Any]]: ... def has_dups(seq) -> bool: ... def has_variety(seq) -> bool: ... -def uniq(seq, result=...) -> Generator[Any, Any, None]: ... +def uniq(seq, result=...) -> Generator[Any]: ... def generate_bell( n, -) -> Generator[ - tuple[Literal[0]] | tuple[Literal[0], Literal[1]] | tuple[Literal[1], Literal[0]] | Any | tuple[int, ...], Any, None -]: ... -def generate_involutions(n) -> Generator[tuple[int, ...], Any, None]: ... -def multiset_derangements(s) -> Generator[list[Any] | list[None] | Any, Any, None]: ... +) -> Generator[tuple[Literal[0]] | tuple[Literal[0], Literal[1]] | tuple[Literal[1], Literal[0]] | Any | tuple[int, ...]]: ... +def generate_involutions(n) -> Generator[tuple[int, ...]]: ... +def multiset_derangements(s) -> Generator[list[Any] | list[None] | Any]: ... def random_derangement(t, choice=..., strict=...) -> str | list[None] | list[Any]: ... -def generate_derangements(s) -> Generator[list[Any] | list[None], Any, None]: ... -def necklaces(n, k, free=...) -> Generator[tuple[Any, ...], Any, None]: ... -def bracelets(n, k) -> Generator[tuple[Any, ...], Any, None]: ... -def generate_oriented_forest(n) -> Generator[list[int], Any, None]: ... +def generate_derangements(s) -> Generator[list[Any] | list[None]]: ... +def necklaces(n, k, free=...) -> Generator[tuple[Any, ...]]: ... +def bracelets(n, k) -> Generator[tuple[Any, ...]]: ... +def generate_oriented_forest(n) -> Generator[list[int]]: ... def minlex(seq, directed=..., key=...) -> tuple[Any, ...] | list[Any]: ... def runs(seq, op=...) -> list[Any]: ... -def sequence_partitions(l, n, /) -> Generator[list[Any] | Any, Any, None]: ... -def sequence_partitions_empty(l, n, /) -> Generator[list[Any] | Any, Any, None]: ... -def kbins( - l, k, ordered=... -) -> Generator[list[Any] | Any | list[list[int]] | list[list[Any]] | list[list[str] | Any], Any, None]: ... -def permute_signs(t) -> Generator[Any, Any, None]: ... -def signed_permutations(t) -> Generator[Any, None, None]: ... -def rotations(s, dir=...) -> Generator[list[Any] | Any, Any, None]: ... -def roundrobin(*iterables) -> Generator[Any, Any, None]: ... +def sequence_partitions(l, n, /) -> Generator[list[Any] | Any]: ... +def sequence_partitions_empty(l, n, /) -> Generator[list[Any] | Any]: ... +def kbins(l, k, ordered=...) -> Generator[list[Any] | Any | list[list[int]] | list[list[Any]] | list[list[str] | Any]]: ... +def permute_signs(t) -> Generator[Any]: ... +def signed_permutations(t) -> Generator[Any]: ... +def rotations(s, dir=...) -> Generator[list[Any] | Any]: ... +def roundrobin(*iterables) -> Generator[Any]: ... class NotIterable: ... def iterable(i, exclude=...) -> bool: ... def is_sequence(i, include=...) -> bool: ... -def postorder_traversal(node, keys=...) -> Generator[Any | Basic, Any, None]: ... +def postorder_traversal(node, keys=...) -> Generator[Any | Basic]: ... def interactive_traversal(expr) -> Basic: ... def default_sort_key( *args, **kwargs @@ -97,4 +83,4 @@ def default_sort_key( tuple[tuple[Literal[5], Literal[0], str], tuple[int, tuple[Any, ...]], Any, Any] | tuple[tuple[Literal[10, 0], Literal[0], str | Any], tuple[int, tuple[Any, ...]] | tuple[Literal[1], tuple[str]], Any, Any] ): ... -def ordered(*args, **kwargs) -> Generator[Any, Any, None]: ... +def ordered(*args, **kwargs) -> Generator[Any]: ...