omdev 0.0.0.dev121__py3-none-any.whl → 0.0.0.dev122__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- omdev/scripts/interp.py +9 -0
- omdev/scripts/pyproject.py +8 -0
- {omdev-0.0.0.dev121.dist-info → omdev-0.0.0.dev122.dist-info}/METADATA +2 -2
- {omdev-0.0.0.dev121.dist-info → omdev-0.0.0.dev122.dist-info}/RECORD +8 -8
- {omdev-0.0.0.dev121.dist-info → omdev-0.0.0.dev122.dist-info}/LICENSE +0 -0
- {omdev-0.0.0.dev121.dist-info → omdev-0.0.0.dev122.dist-info}/WHEEL +0 -0
- {omdev-0.0.0.dev121.dist-info → omdev-0.0.0.dev122.dist-info}/entry_points.txt +0 -0
- {omdev-0.0.0.dev121.dist-info → omdev-0.0.0.dev122.dist-info}/top_level.txt +0 -0
omdev/scripts/interp.py
CHANGED
|
@@ -29,6 +29,7 @@ import shutil
|
|
|
29
29
|
import subprocess
|
|
30
30
|
import sys
|
|
31
31
|
import threading
|
|
32
|
+
import types
|
|
32
33
|
import typing as ta
|
|
33
34
|
|
|
34
35
|
|
|
@@ -614,6 +615,14 @@ def get_optional_alias_arg(spec: ta.Any) -> ta.Any:
|
|
|
614
615
|
return it
|
|
615
616
|
|
|
616
617
|
|
|
618
|
+
def is_new_type(spec: ta.Any) -> bool:
|
|
619
|
+
if isinstance(ta.NewType, type):
|
|
620
|
+
return isinstance(spec, ta.NewType)
|
|
621
|
+
else:
|
|
622
|
+
# Before https://github.com/python/cpython/commit/c2f33dfc83ab270412bf243fb21f724037effa1a
|
|
623
|
+
return isinstance(spec, types.FunctionType) and spec.__code__ is ta.NewType.__code__.co_consts[1] # type: ignore # noqa
|
|
624
|
+
|
|
625
|
+
|
|
617
626
|
def deep_subclasses(cls: ta.Type[T]) -> ta.Iterator[ta.Type[T]]:
|
|
618
627
|
seen = set()
|
|
619
628
|
todo = list(reversed(cls.__subclasses__()))
|
omdev/scripts/pyproject.py
CHANGED
|
@@ -1905,6 +1905,14 @@ def get_optional_alias_arg(spec: ta.Any) -> ta.Any:
|
|
|
1905
1905
|
return it
|
|
1906
1906
|
|
|
1907
1907
|
|
|
1908
|
+
def is_new_type(spec: ta.Any) -> bool:
|
|
1909
|
+
if isinstance(ta.NewType, type):
|
|
1910
|
+
return isinstance(spec, ta.NewType)
|
|
1911
|
+
else:
|
|
1912
|
+
# Before https://github.com/python/cpython/commit/c2f33dfc83ab270412bf243fb21f724037effa1a
|
|
1913
|
+
return isinstance(spec, types.FunctionType) and spec.__code__ is ta.NewType.__code__.co_consts[1] # type: ignore # noqa
|
|
1914
|
+
|
|
1915
|
+
|
|
1908
1916
|
def deep_subclasses(cls: ta.Type[T]) -> ta.Iterator[ta.Type[T]]:
|
|
1909
1917
|
seen = set()
|
|
1910
1918
|
todo = list(reversed(cls.__subclasses__()))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: omdev
|
|
3
|
-
Version: 0.0.0.
|
|
3
|
+
Version: 0.0.0.dev122
|
|
4
4
|
Summary: omdev
|
|
5
5
|
Author: wrmsr
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -12,7 +12,7 @@ Classifier: Operating System :: OS Independent
|
|
|
12
12
|
Classifier: Operating System :: POSIX
|
|
13
13
|
Requires-Python: >=3.12
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: omlish ==0.0.0.
|
|
15
|
+
Requires-Dist: omlish ==0.0.0.dev122
|
|
16
16
|
Provides-Extra: all
|
|
17
17
|
Requires-Dist: black ~=24.10 ; extra == 'all'
|
|
18
18
|
Requires-Dist: pycparser ~=2.22 ; extra == 'all'
|
|
@@ -122,8 +122,8 @@ omdev/scripts/bumpversion.py,sha256=Kn7fo73Hs8uJh3Hi3EIyLOlzLPWAC6dwuD_lZ3cIzuY,
|
|
|
122
122
|
omdev/scripts/execrss.py,sha256=mR0G0wERBYtQmVIn63lCIIFb5zkCM6X_XOENDFYDBKc,651
|
|
123
123
|
omdev/scripts/exectime.py,sha256=sFb376GflU6s9gNX-2-we8hgH6w5MuQNS9g6i4SqJIo,610
|
|
124
124
|
omdev/scripts/importtrace.py,sha256=Jbo3Yk2RAbE8_tJ97iTcVNpoxCJxrRb2tl1W_CV3NG0,14067
|
|
125
|
-
omdev/scripts/interp.py,sha256=
|
|
126
|
-
omdev/scripts/pyproject.py,sha256=
|
|
125
|
+
omdev/scripts/interp.py,sha256=pkQEle7G2FUd69baRvopjdi4KYwXbZpJBdgn60v1S0g,73043
|
|
126
|
+
omdev/scripts/pyproject.py,sha256=a6fG_cI-HGFxXcgtPU8K3ybD8P9d9FshhnI-ro5D6eo,174244
|
|
127
127
|
omdev/scripts/slowcat.py,sha256=lssv4yrgJHiWfOiHkUut2p8E8Tq32zB-ujXESQxFFHY,2728
|
|
128
128
|
omdev/scripts/tmpexec.py,sha256=WTYcf56Tj2qjYV14AWmV8SfT0u6Y8eIU6cKgQRvEK3c,1442
|
|
129
129
|
omdev/toml/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
|
|
@@ -143,9 +143,9 @@ omdev/tools/sqlrepl.py,sha256=tmFZh80-xsGM62dyQ7_UGLebChrj7IHbIPYBWDJMgVk,5741
|
|
|
143
143
|
omdev/tools/pawk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
144
144
|
omdev/tools/pawk/__main__.py,sha256=VCqeRVnqT1RPEoIrqHFSu4PXVMg4YEgF4qCQm90-eRI,66
|
|
145
145
|
omdev/tools/pawk/pawk.py,sha256=Eckymn22GfychCQcQi96BFqRo_LmiJ-EPhC8TTUJdB4,11446
|
|
146
|
-
omdev-0.0.0.
|
|
147
|
-
omdev-0.0.0.
|
|
148
|
-
omdev-0.0.0.
|
|
149
|
-
omdev-0.0.0.
|
|
150
|
-
omdev-0.0.0.
|
|
151
|
-
omdev-0.0.0.
|
|
146
|
+
omdev-0.0.0.dev122.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
|
147
|
+
omdev-0.0.0.dev122.dist-info/METADATA,sha256=0wbxz7KBMMCVnIglShq2u_mpBcUhPKpdxdkXRWbZ65A,1810
|
|
148
|
+
omdev-0.0.0.dev122.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
|
|
149
|
+
omdev-0.0.0.dev122.dist-info/entry_points.txt,sha256=dHLXFmq5D9B8qUyhRtFqTGWGxlbx3t5ejedjrnXNYLU,33
|
|
150
|
+
omdev-0.0.0.dev122.dist-info/top_level.txt,sha256=1nr7j30fEWgLYHW3lGR9pkdHkb7knv1U1ES1XRNVQ6k,6
|
|
151
|
+
omdev-0.0.0.dev122.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|