Skip to content

Commit fa0dabf

Browse files
committed
Remove bogus conditions from type stubs
1 parent 735c2f9 commit fa0dabf

File tree

8 files changed

+3
-27
lines changed

8 files changed

+3
-27
lines changed

stubs/matplotlib/transforms.pyi

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ class TransformNode:
1616
is_bbox = ...
1717
pass_through = ...
1818
def __init__(self, shorthand_name: str = ...) -> None: ...
19-
if DEBUG:
20-
def __str__(self) -> str: ...
21-
2219
def __getstate__(self): ...
2320
def __setstate__(self, data_dict): ...
2421
def __copy__(self): ...
@@ -29,7 +26,6 @@ class TransformNode:
2926
class BboxBase(TransformNode):
3027
is_bbox = ...
3128
is_affine = ...
32-
if DEBUG: ...
3329

3430
def frozen(self): ...
3531
def __array__(self, *args, **kwargs): ...

stubs/sympy-stubs/__init__.pyi

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -921,9 +921,7 @@ from sympy.utilities import (
921921
xthreaded,
922922
)
923923

924-
if sys.version_info < (3, 8): ...
925-
if "dev" in __version__:
926-
def enable_warnings() -> None: ...
924+
def enable_warnings() -> None: ...
927925

928926
SYMPY_DEBUG: bool = ...
929927
test = ...

stubs/sympy-stubs/core/cache.pyi

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,8 @@ print_cache = ...
99
clear_cache = ...
1010
USE_CACHE = ...
1111
scs = ...
12-
if scs.lower() == "none":
13-
SYMPY_CACHE_SIZE = ...
14-
else:
15-
SYMPY_CACHE_SIZE = ...
16-
if USE_CACHE == "no":
17-
cacheit = ...
18-
else:
19-
cacheit = ...
12+
SYMPY_CACHE_SIZE = ...
13+
cacheit = ...
2014

2115
def cached_property(func) -> property: ...
2216
def lazy_function(module: str, name: str) -> Callable:

stubs/sympy-stubs/physics/control/control_plots.pyi

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ __all__ = [
1717
]
1818
matplotlib = ...
1919
numpy = ...
20-
if matplotlib:
21-
plt = ...
22-
if numpy:
23-
np = ...
2420

2521
def pole_zero_numerical_data(system) -> tuple[Any, Any]: ...
2622
def pole_zero_plot(

stubs/sympy-stubs/plotting/pygletplot/managed_window.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ class ManagedWindow:
1010
def update(self, dt) -> None: ...
1111
def draw(self) -> None: ...
1212

13-
if __name__ == "__main__": ...

stubs/sympy-stubs/polys/numberfields/galois_resolvents.pyi

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,3 @@ def define_resolvents() -> dict[
2626
]: ...
2727
def generate_lambda_lookup(verbose=..., trial_run=...) -> str: ...
2828
def get_resolvent_by_lookup(T, number) -> list[Any]: ...
29-
30-
if __name__ == "__main__":
31-
verbose = ...
32-
trial_run = ...
33-
table = ...

stubs/sympy-stubs/simplify/fu.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ def TR22(rv, max=..., pow=...): ...
2929
def TRpower(rv): ...
3030
def L(rv): ...
3131

32-
if SYMPY_DEBUG: ...
3332
CTR1 = ...
3433
CTR2 = ...
3534
CTR3 = ...

stubs/sympy-stubs/testing/runtests.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class Skipped(Exception): ...
1313
class TimeOutError(Exception): ...
1414
class DependencyError(Exception): ...
1515

16-
if IS_WINDOWS: ...
1716

1817
def convert_to_native_paths(lst) -> list[Any]: ...
1918
def get_sympy_dir() -> str: ...

0 commit comments

Comments
 (0)