File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
tests/unit/samples/wiring Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -321,13 +321,7 @@ def _is_werkzeug_local_proxy(self, instance: object) -> bool:
321
321
def _is_starlette_request_cls (self , instance : object ) -> bool :
322
322
return starlette \
323
323
and isinstance (instance , type ) \
324
- and self ._safe_is_subclass (instance , starlette .requests .Request )
325
-
326
- def _safe_is_subclass (self , instance : type , cls : type ) -> bool :
327
- try :
328
- return issubclass (instance , cls )
329
- except TypeError :
330
- return False
324
+ and _safe_is_subclass (instance , starlette .requests .Request )
331
325
332
326
def _is_builtin (self , instance : object ) -> bool :
333
327
return inspect .isbuiltin (instance )
@@ -685,6 +679,13 @@ def _is_declarative_container(instance: Any) -> bool:
685
679
and getattr (instance , "declarative_parent" , None ) is None )
686
680
687
681
682
+ def _safe_is_subclass (instance : Any , cls : Type ) -> bool :
683
+ try :
684
+ return issubclass (instance , cls )
685
+ except TypeError :
686
+ return False
687
+
688
+
688
689
class Modifier :
689
690
690
691
def modify (
Original file line number Diff line number Diff line change 5
5
if "pypy" not in sys .version .lower ():
6
6
import numpy # noqa
7
7
from numpy import * # noqa
8
- from numpy .typing import * # noqa
8
+ if sys .version_info >= (3 , 7 ):
9
+ from numpy .typing import * # noqa
9
10
10
11
import scipy # noqa
11
12
from scipy import * # noqa
You can’t perform that action at this time.
0 commit comments