annet 3.20.0__py3-none-any.whl → 3.20.1__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.
Potentially problematic release.
This version of annet might be problematic. Click here for more details.
- annet/annlib/rbparser/syntax.py +8 -12
- {annet-3.20.0.dist-info → annet-3.20.1.dist-info}/METADATA +1 -1
- {annet-3.20.0.dist-info → annet-3.20.1.dist-info}/RECORD +8 -8
- {annet-3.20.0.dist-info → annet-3.20.1.dist-info}/WHEEL +0 -0
- {annet-3.20.0.dist-info → annet-3.20.1.dist-info}/entry_points.txt +0 -0
- {annet-3.20.0.dist-info → annet-3.20.1.dist-info}/licenses/AUTHORS +0 -0
- {annet-3.20.0.dist-info → annet-3.20.1.dist-info}/licenses/LICENSE +0 -0
- {annet-3.20.0.dist-info → annet-3.20.1.dist-info}/top_level.txt +0 -0
annet/annlib/rbparser/syntax.py
CHANGED
|
@@ -72,19 +72,15 @@ def _parse_tree_with_params(raw_tree, scheme, context=None):
|
|
|
72
72
|
return tree
|
|
73
73
|
|
|
74
74
|
|
|
75
|
-
def _parse_raw_rule(raw_rule, scheme):
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if params:
|
|
83
|
-
raw_rule = raw_rule[:index].strip()
|
|
84
|
-
except ValueError:
|
|
85
|
-
params = {}
|
|
75
|
+
def _parse_raw_rule(raw_rule: str, scheme) -> tuple[str, dict[str, str]]:
|
|
76
|
+
params: dict[str, str] = {}
|
|
77
|
+
|
|
78
|
+
row, *params_raw = re.split(r"(?:^|\s)%(?=[a-zA-Z_]\w*)", raw_rule)
|
|
79
|
+
for param in params_raw:
|
|
80
|
+
name, _, value = param.partition("=")
|
|
81
|
+
params[name] = value.strip() or "1"
|
|
86
82
|
|
|
87
|
-
row = re.sub(r"\s+", " ",
|
|
83
|
+
row = re.sub(r"\s+", " ", row.strip())
|
|
88
84
|
params = _fill_and_validate(params, scheme, raw_rule)
|
|
89
85
|
return row, params
|
|
90
86
|
|
|
@@ -72,7 +72,7 @@ annet/annlib/rbparser/acl.py,sha256=I_1VUZQgF-s4dYTxyEDxQ-GkAP2MeXonzzsc2xROpTM,
|
|
|
72
72
|
annet/annlib/rbparser/deploying.py,sha256=ACT8QNhDAhJx3ZKuGh2nYBOrpdka2qEKuLDxvQAGKLk,1649
|
|
73
73
|
annet/annlib/rbparser/ordering.py,sha256=XknggB92N4IbhHBZZHL0StwCCITt8mkho4D4Nu5Kb4k,2185
|
|
74
74
|
annet/annlib/rbparser/platform.py,sha256=wndmmg3ds2PS-g8vq_Iq4lCLUcK6J6YaJq-RspsqYGE,36
|
|
75
|
-
annet/annlib/rbparser/syntax.py,sha256=
|
|
75
|
+
annet/annlib/rbparser/syntax.py,sha256=tX_Ukp64k0k-4rZApaXGPgKWOUPoqbktVwOjewOlccQ,3437
|
|
76
76
|
annet/annlib/rulebook/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
77
77
|
annet/annlib/rulebook/common.py,sha256=6A3sOkOanDRTuR7F426zakShGaGKRBmBLDCnqBbBJr8,13531
|
|
78
78
|
annet/api/__init__.py,sha256=5YzScmeCDsHiDhtT3RwY_lMuikRZ6o7CVrlnJCln2A8,34116
|
|
@@ -209,8 +209,8 @@ annet/vendors/library/optixtrans.py,sha256=VdME69Ca4HAEgoaKN21fZxnmmsqqaxOe_HZja
|
|
|
209
209
|
annet/vendors/library/pc.py,sha256=vfv31_NPi7M-4AUDL89UcpawK2E6xvCpELA209cd1ho,1086
|
|
210
210
|
annet/vendors/library/ribbon.py,sha256=DDOBq-_-FL9dCxqXs2inEWZ-pvw-dJ-A-prA7cKMhec,1216
|
|
211
211
|
annet/vendors/library/routeros.py,sha256=iQa7m_4wjuvcgBOI9gyZwlw1BvzJfOkvUbyoEk-NI9I,1254
|
|
212
|
-
annet-3.20.
|
|
213
|
-
annet-3.20.
|
|
212
|
+
annet-3.20.1.dist-info/licenses/AUTHORS,sha256=rh3w5P6gEgqmuC-bw-HB68vBCr-yIBFhVL0PG4hguLs,878
|
|
213
|
+
annet-3.20.1.dist-info/licenses/LICENSE,sha256=yPxl7dno02Pw7gAcFPIFONzx_gapwDoPXsIsh6Y7lC0,1079
|
|
214
214
|
annet_generators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
215
215
|
annet_generators/example/__init__.py,sha256=OJ77uj8axc-FIyIu_Xdcnzmde3oQW5mk5qbODkhuVc8,355
|
|
216
216
|
annet_generators/example/hostname.py,sha256=RloLzNVetEoWPLITzfJ13Nk3CC0yi-cZB1RTd6dnuhI,2541
|
|
@@ -223,8 +223,8 @@ annet_generators/rpl_example/generator.py,sha256=EWah19gOH8G-QyNyWqxCqdRi0BK7GbM
|
|
|
223
223
|
annet_generators/rpl_example/items.py,sha256=HPgxScDvSqJPdz0c2SppDrH82DZYC4zUaniQwcWmh4A,1176
|
|
224
224
|
annet_generators/rpl_example/mesh.py,sha256=z_WgfDZZ4xnyh3cSf75igyH09hGvtexEVwy1gCD_DzA,288
|
|
225
225
|
annet_generators/rpl_example/route_policy.py,sha256=z6nPb0VDeQtKD1NIg9sFvmUxBD5tVs2frfNIuKdM-5c,2318
|
|
226
|
-
annet-3.20.
|
|
227
|
-
annet-3.20.
|
|
228
|
-
annet-3.20.
|
|
229
|
-
annet-3.20.
|
|
230
|
-
annet-3.20.
|
|
226
|
+
annet-3.20.1.dist-info/METADATA,sha256=XrTRMmpU7-AcqJFX6fmimmMGmTSb2YCZ40NrhwZ6Tug,906
|
|
227
|
+
annet-3.20.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
228
|
+
annet-3.20.1.dist-info/entry_points.txt,sha256=5lIaDGlGi3l6QQ2ry2jZaqViP5Lvt8AmsegdD0Uznck,192
|
|
229
|
+
annet-3.20.1.dist-info/top_level.txt,sha256=QsoTZBsUtwp_FEcmRwuN8QITBmLOZFqjssRfKilGbP8,23
|
|
230
|
+
annet-3.20.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|