netherframe.codec.autoid 0.4.0__tar.gz → 0.5.0__tar.gz
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.
- {netherframe_codec_autoid-0.4.0 → netherframe_codec_autoid-0.5.0}/PKG-INFO +2 -3
- {netherframe_codec_autoid-0.4.0 → netherframe_codec_autoid-0.5.0}/netherframe/codec/autoid/codec_registration.py +1 -2
- {netherframe_codec_autoid-0.4.0 → netherframe_codec_autoid-0.5.0}/netherframe/codec/autoid/preprocessor.py +4 -6
- {netherframe_codec_autoid-0.4.0 → netherframe_codec_autoid-0.5.0}/pyproject.toml +2 -3
- {netherframe_codec_autoid-0.4.0 → netherframe_codec_autoid-0.5.0}/pyproject.toml.orig +2 -3
- netherframe_codec_autoid-0.4.0/data/purelib/nf_codec_autoid_autoregister.pth +0 -1
- {netherframe_codec_autoid-0.4.0 → netherframe_codec_autoid-0.5.0}/LICENSE +0 -0
- {netherframe_codec_autoid-0.4.0 → netherframe_codec_autoid-0.5.0}/README.md +0 -0
- {netherframe_codec_autoid-0.4.0 → netherframe_codec_autoid-0.5.0}/data/purelib/nf_codec_autoid_autoregister.start +0 -0
- {netherframe_codec_autoid-0.4.0 → netherframe_codec_autoid-0.5.0}/netherframe/codec/autoid/__init__.py +0 -0
- {netherframe_codec_autoid-0.4.0 → netherframe_codec_autoid-0.5.0}/netherframe/codec/autoid/py.typed +0 -0
- {netherframe_codec_autoid-0.4.0 → netherframe_codec_autoid-0.5.0}/nf/codec/autoid/__init__.py +0 -0
- {netherframe_codec_autoid-0.4.0 → netherframe_codec_autoid-0.5.0}/nf/codec/autoid/codec_registration.py +0 -0
- {netherframe_codec_autoid-0.4.0 → netherframe_codec_autoid-0.5.0}/nf/codec/autoid/preprocessor.py +0 -0
- {netherframe_codec_autoid-0.4.0 → netherframe_codec_autoid-0.5.0}/nf/codec/autoid/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: netherframe.codec.autoid
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Auto-ID codec and preprocessor for Netherframe
|
|
5
5
|
Author: Sourabh Cheedella
|
|
6
6
|
Author-email: Sourabh Cheedella <cheedella.sourabh@gmail.com>
|
|
@@ -8,10 +8,9 @@ License-Expression: MIT
|
|
|
8
8
|
License-File: LICENSE
|
|
9
9
|
Classifier: Development Status :: 4 - Beta
|
|
10
10
|
Classifier: Intended Audience :: Developers
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.14
|
|
12
11
|
Classifier: Programming Language :: Python :: 3.15
|
|
13
12
|
Requires-Dist: libcst>=1.9.0
|
|
14
|
-
Requires-Python: >=3.
|
|
13
|
+
Requires-Python: >=3.15
|
|
15
14
|
Project-URL: Homepage, https://netherframe.arsenal.sh
|
|
16
15
|
Project-URL: Repository, https://github.com/arsenal-sh/netherframe
|
|
17
16
|
Description-Content-Type: text/markdown
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"""Register the nf_autoid source codec without importing the preprocessor.
|
|
2
2
|
|
|
3
|
-
This module is loaded by a .start entry point (
|
|
4
|
-
at every interpreter start, so it must stay cheap: libcst and the preprocessor
|
|
3
|
+
This module is loaded by a .start entry point (PEP 829) at every interpreter start, so it must stay cheap: libcst and the preprocessor
|
|
5
4
|
load only when a source file actually declares ``# coding: nf_autoid``.
|
|
6
5
|
"""
|
|
7
6
|
|
|
@@ -5,8 +5,8 @@ injects variable names into Netherframe construct instantiations using LibCST
|
|
|
5
5
|
and registers a custom codec for transparent preprocessing during imports.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
-
from collections.abc import Buffer
|
|
9
8
|
import codecs
|
|
9
|
+
from collections.abc import Buffer
|
|
10
10
|
|
|
11
11
|
import libcst as cst
|
|
12
12
|
|
|
@@ -268,9 +268,7 @@ class LibCSTTransformer(cst.CSTTransformer):
|
|
|
268
268
|
# So we don't wrap these automatically
|
|
269
269
|
return updated_node
|
|
270
270
|
|
|
271
|
-
_NON_CONSTRUCT_BUILTINS = frozenset(
|
|
272
|
-
{"open", "dict", "list", "set", "tuple", "str", "int", "float", "bool", "bytes", "object", "range", "enumerate", "zip", "map", "filter", "iter"}
|
|
273
|
-
)
|
|
271
|
+
_NON_CONSTRUCT_BUILTINS = frozenset({"open", "dict", "list", "set", "tuple", "str", "int", "float", "bool", "bytes", "object", "range", "enumerate", "zip", "map", "filter", "iter"})
|
|
274
272
|
|
|
275
273
|
def leave_With(self, original_node: cst.With, updated_node: cst.With) -> cst.With:
|
|
276
274
|
"""Transform context manager assignments when BindContext is present."""
|
|
@@ -287,8 +285,8 @@ class LibCSTTransformer(cst.CSTTransformer):
|
|
|
287
285
|
continue
|
|
288
286
|
var_name = self._extract_asname(item.asname)
|
|
289
287
|
if var_name:
|
|
290
|
-
|
|
291
|
-
|
|
288
|
+
new_items.append(item.with_changes(item=self._inject_nf_id(item.item, var_name)))
|
|
289
|
+
continue
|
|
292
290
|
new_items.append(item)
|
|
293
291
|
|
|
294
292
|
return updated_node.with_changes(items=new_items)
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "netherframe.codec.autoid"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.5.0"
|
|
4
4
|
description = "Auto-ID codec and preprocessor for Netherframe"
|
|
5
5
|
readme = "README.md"
|
|
6
|
-
requires-python = ">=3.
|
|
6
|
+
requires-python = ">=3.15"
|
|
7
7
|
classifiers = [
|
|
8
8
|
"Development Status :: 4 - Beta",
|
|
9
9
|
"Intended Audience :: Developers",
|
|
10
|
-
"Programming Language :: Python :: 3.14",
|
|
11
10
|
"Programming Language :: Python :: 3.15",
|
|
12
11
|
]
|
|
13
12
|
license = "MIT"
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "netherframe.codec.autoid"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.5.0"
|
|
4
4
|
description = "Auto-ID codec and preprocessor for Netherframe"
|
|
5
5
|
authors = [
|
|
6
6
|
{name = "Sourabh Cheedella", email = "cheedella.sourabh@gmail.com"},
|
|
7
7
|
]
|
|
8
8
|
readme = "README.md"
|
|
9
|
-
requires-python = ">=3.
|
|
9
|
+
requires-python = ">=3.15"
|
|
10
10
|
classifiers = [
|
|
11
11
|
"Development Status :: 4 - Beta",
|
|
12
12
|
"Intended Audience :: Developers",
|
|
13
|
-
"Programming Language :: Python :: 3.14",
|
|
14
13
|
"Programming Language :: Python :: 3.15",
|
|
15
14
|
]
|
|
16
15
|
license = "MIT"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import netherframe.codec.autoid.codec_registration
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{netherframe_codec_autoid-0.4.0 → netherframe_codec_autoid-0.5.0}/netherframe/codec/autoid/py.typed
RENAMED
|
File without changes
|
{netherframe_codec_autoid-0.4.0 → netherframe_codec_autoid-0.5.0}/nf/codec/autoid/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{netherframe_codec_autoid-0.4.0 → netherframe_codec_autoid-0.5.0}/nf/codec/autoid/preprocessor.py
RENAMED
|
File without changes
|
|
File without changes
|