jwbmisc 0.0.1__py3-none-any.whl → 0.0.2__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.
- jwbmisc/__init__.py +10 -0
- jwbmisc/_version.py +16 -3
- {jwbmisc-0.0.1.dist-info → jwbmisc-0.0.2.dist-info}/METADATA +1 -1
- jwbmisc-0.0.2.dist-info/RECORD +7 -0
- jwbmisc-0.0.1.dist-info/RECORD +0 -7
- {jwbmisc-0.0.1.dist-info → jwbmisc-0.0.2.dist-info}/WHEEL +0 -0
- {jwbmisc-0.0.1.dist-info → jwbmisc-0.0.2.dist-info}/licenses/LICENSE +0 -0
- {jwbmisc-0.0.1.dist-info → jwbmisc-0.0.2.dist-info}/top_level.txt +0 -0
jwbmisc/__init__.py
CHANGED
|
@@ -213,6 +213,16 @@ def find_root(start, req):
|
|
|
213
213
|
p = p.parent
|
|
214
214
|
return None
|
|
215
215
|
|
|
216
|
+
def jsonc_loads(data: str):
|
|
217
|
+
data = re.sub(r"//.*$", "", data, flags=re.MULTILINE)
|
|
218
|
+
data = re.sub(r"/\*.*?\*/", "", data, flags=re.DOTALL)
|
|
219
|
+
return json.loads(data)
|
|
220
|
+
|
|
221
|
+
def jsonc_read(f: str | Path):
|
|
222
|
+
f = Path(f)
|
|
223
|
+
open_fn = gzip.open if f.suffix.lower() == ".gz" else open
|
|
224
|
+
with open_fn(f, "rt", encoding="utf-8") as fd:
|
|
225
|
+
return jsonc_loads(fd.read())
|
|
216
226
|
|
|
217
227
|
def ndjson_read(f: str | Path):
|
|
218
228
|
f = Path(f)
|
jwbmisc/_version.py
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
# file generated by setuptools-scm
|
|
2
2
|
# don't change, don't track in version control
|
|
3
3
|
|
|
4
|
-
__all__ = [
|
|
4
|
+
__all__ = [
|
|
5
|
+
"__version__",
|
|
6
|
+
"__version_tuple__",
|
|
7
|
+
"version",
|
|
8
|
+
"version_tuple",
|
|
9
|
+
"__commit_id__",
|
|
10
|
+
"commit_id",
|
|
11
|
+
]
|
|
5
12
|
|
|
6
13
|
TYPE_CHECKING = False
|
|
7
14
|
if TYPE_CHECKING:
|
|
@@ -9,13 +16,19 @@ if TYPE_CHECKING:
|
|
|
9
16
|
from typing import Union
|
|
10
17
|
|
|
11
18
|
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
19
|
+
COMMIT_ID = Union[str, None]
|
|
12
20
|
else:
|
|
13
21
|
VERSION_TUPLE = object
|
|
22
|
+
COMMIT_ID = object
|
|
14
23
|
|
|
15
24
|
version: str
|
|
16
25
|
__version__: str
|
|
17
26
|
__version_tuple__: VERSION_TUPLE
|
|
18
27
|
version_tuple: VERSION_TUPLE
|
|
28
|
+
commit_id: COMMIT_ID
|
|
29
|
+
__commit_id__: COMMIT_ID
|
|
19
30
|
|
|
20
|
-
__version__ = version = '0.0.
|
|
21
|
-
__version_tuple__ = version_tuple = (0, 0,
|
|
31
|
+
__version__ = version = '0.0.2'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 0, 2)
|
|
33
|
+
|
|
34
|
+
__commit_id__ = commit_id = None
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
jwbmisc/__init__.py,sha256=Tgh1Dm7B00JknbD4frFd-rAFy2E3NuT-9eZub9ck-Lg,6702
|
|
2
|
+
jwbmisc/_version.py,sha256=huLsL1iGeXWQKZ8bjwDdIWC7JOkj3wnzBh-HFMZl1PY,704
|
|
3
|
+
jwbmisc-0.0.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
4
|
+
jwbmisc-0.0.2.dist-info/METADATA,sha256=uJnh1a-j_XzPaE3zzPXBeMye2VKp2EHEaZHv25GWtdo,14444
|
|
5
|
+
jwbmisc-0.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
6
|
+
jwbmisc-0.0.2.dist-info/top_level.txt,sha256=FqEYs8zdG3iGOJmC6cutDXfGQUNptzfYeKsaG43y1HE,8
|
|
7
|
+
jwbmisc-0.0.2.dist-info/RECORD,,
|
jwbmisc-0.0.1.dist-info/RECORD
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
jwbmisc/__init__.py,sha256=76SxV6Bclcj2SEPl0oP7vh0Lwc6-jcN8_D40AZyhv28,6329
|
|
2
|
-
jwbmisc/_version.py,sha256=vgltXBYF55vNcC2regxjGN0_cbebmm8VgcDdQaDapWQ,511
|
|
3
|
-
jwbmisc-0.0.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
4
|
-
jwbmisc-0.0.1.dist-info/METADATA,sha256=WuH6SjHMJaByb12W_PDj6oWNmXwGCl6Ywrs0B0BzA7c,14444
|
|
5
|
-
jwbmisc-0.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
6
|
-
jwbmisc-0.0.1.dist-info/top_level.txt,sha256=FqEYs8zdG3iGOJmC6cutDXfGQUNptzfYeKsaG43y1HE,8
|
|
7
|
-
jwbmisc-0.0.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|