php-parser-py 3.0.1__py3-none-win_amd64.whl → 3.0.2__py3-none-win_amd64.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.
@@ -1,7 +1,5 @@
1
1
  """Graph layer: AST querying, node/edge wrappers, and mutation."""
2
2
 
3
- # pylint: disable=duplicate-code # __all__ mirrors the package re-export list.
4
-
5
3
  from __future__ import annotations
6
4
 
7
5
  __all__ = [
@@ -81,13 +81,6 @@ class Modifier:
81
81
  """
82
82
  if not self._storage.contains_node(node_id):
83
83
  raise KeyError(f"Node not found: {node_id!r}")
84
- # Storage.remove_node drops only the removed node's adjacency list;
85
- # remove_edge is the only API that also cleans the other endpoint.
86
- incident = dict.fromkeys(
87
- (*self._storage.in_edges(node_id), *self._storage.out_edges(node_id))
88
- )
89
- for edge_id in incident:
90
- self._storage.remove_edge(edge_id)
91
84
  self._storage.remove_node(node_id)
92
85
 
93
86
  # -- Edge Operations --
@@ -48,8 +48,7 @@ def _free_slot(seen: AbstractSet[EdgeSlot], slot: EdgeSlot, nid: str) -> EdgeSlo
48
48
  # the caller records the returned slot in the set it owns.
49
49
  if slot in seen:
50
50
  raise ValueError(
51
- f"Duplicate child for field {slot.field!r} index {slot.index} "
52
- f"on node {nid}"
51
+ f"Duplicate child for field {slot.field!r} index {slot.index} on node {nid}"
53
52
  )
54
53
  return slot
55
54
 
php_parser_py/_printer.py CHANGED
@@ -138,8 +138,7 @@ class _PrinterBase:
138
138
  """Return the AST's parse target, rejecting unknown provenance."""
139
139
  if ast.target_php is None:
140
140
  raise ValueError(
141
- "Cannot print an AST of unknown parse provenance: "
142
- "target_php is None."
141
+ "Cannot print an AST of unknown parse provenance: target_php is None."
143
142
  )
144
143
  return ast.target_php
145
144
 
@@ -19,7 +19,7 @@ from importlib import resources
19
19
  from pathlib import Path
20
20
 
21
21
  if sys.platform == "win32":
22
- import msvcrt # pylint: disable=import-error
22
+ import msvcrt
23
23
  else:
24
24
  import fcntl
25
25
 
php_parser_py/_version.py CHANGED
@@ -39,6 +39,5 @@ class PHPVersion:
39
39
  _require_int("minor", self.minor)
40
40
  if self.major < 0 or self.minor < 0:
41
41
  raise ValueError(
42
- f"Target PHP version {self.major}.{self.minor} has a negative "
43
- "component"
42
+ f"Target PHP version {self.major}.{self.minor} has a negative component"
44
43
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: php-parser-py
3
- Version: 3.0.1
3
+ Version: 3.0.2
4
4
  Summary: Python wrapper for PHP-Parser using cpg2py
5
5
  License-Expression: GPL-2.0-only
6
6
  License-File: LICENSE
@@ -12,7 +12,7 @@ Classifier: Intended Audience :: Developers
12
12
  Classifier: Programming Language :: Python :: 3
13
13
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
14
14
  Requires-Python: >=3.11.5
15
- Requires-Dist: cpg2py>=1.2.0
15
+ Requires-Dist: cpg2py>=1.2.3
16
16
  Requires-Dist: static-php-py==0.3.0
17
17
  Description-Content-Type: text/markdown
18
18
 
@@ -1,21 +1,21 @@
1
1
  php_parser_py/__init__.py,sha256=sM40lfvkMJdl5SwJSDFbA88DHuju5RGSetUzj6BR0nE,826
2
2
  php_parser_py/_bookkeeping.py,sha256=XFvDheQySlI3gzuPVubVQTZkCW11HppmbD_6xaphe7E,4386
3
3
  php_parser_py/_exceptions.py,sha256=lWGngHWCrOEGL3ILwPMFnU0mlha6e5U6SYxz7n1oLY8,1824
4
- php_parser_py/_graph/__init__.py,sha256=GAOtPcGGMQCbif86vdQgk9GgTkOJPee6_NA-wewN3g8,396
4
+ php_parser_py/_graph/__init__.py,sha256=z29_SxmqLfPSxP93RC9XATrAHXgLGOwHqrMAzbLXtkY,315
5
5
  php_parser_py/_graph/_ast.py,sha256=MUVNs0r5FooLDPVlpfQQKIqbAlBylCQdPeijxjm2VvQ,10875
6
6
  php_parser_py/_graph/_containment.py,sha256=62UzWbyHzat_R4DmAZCum_gPliCGYR59LqKgOe30teM,1196
7
7
  php_parser_py/_graph/_edge.py,sha256=iMByu29wB_DwG6tDtiBTydc8mGijwB0aAWIvVOH7uhk,3178
8
- php_parser_py/_graph/_modifier.py,sha256=xrMTDM29UBs1QQsIXzybDAbmpxOab4fvBNP7vb7XLPw,5215
8
+ php_parser_py/_graph/_modifier.py,sha256=Ez7tlpAdqNGE9cXSWdOVTjeYhT1DTdvh9pn-jZLTfeE,4858
9
9
  php_parser_py/_graph/_node.py,sha256=29ZKHIIAAz51Gie_J-dsplkBzjzi7YMcO4rv-Ti9Hd0,8447
10
10
  php_parser_py/_graph/_node_id.py,sha256=hVHkgHDlpDiU4OgInRvBRONtP-SQq5ac9l30r_pejMs,831
11
11
  php_parser_py/_mapping/__init__.py,sha256=tS4kJVJB6ZLzXrIx1CqY7dPdKFp-yPRl5niiKzdMn4A,577
12
12
  php_parser_py/_mapping/_build.py,sha256=ya7GwhdlFKkBp1-6AuiVgX_XGmo5l34PIxRw6JEa2Og,12169
13
13
  php_parser_py/_mapping/_contract.py,sha256=zPvLoLMMWAInwAEoFeQnNfI-8s5Triez-X3MzaBO5nE,2414
14
14
  php_parser_py/_mapping/_declared.py,sha256=-EYS7yYQCt0bsEXOa3Nr69KRCMrV6mqFShgqW6pQ5Wo,1831
15
- php_parser_py/_mapping/_serialize.py,sha256=QYD8OdpyYBvRk7ygF_YK7JOC03Ofb4ArVP664jZ6-UM,10200
15
+ php_parser_py/_mapping/_serialize.py,sha256=PAhBQ_4dmyrJ_njTS0K8n1ZtnmhrezY7fh9OFwMCcaw,10184
16
16
  php_parser_py/_node_fields.py,sha256=ymA2RbqqkglcIS1xshBZdxJ3G310y81X-WRRLF0NlhA,6710
17
17
  php_parser_py/_parser.py,sha256=NiEbuBVr3znyE2v7dssRI6nGkykPvvkEWnBs7ANvWko,9738
18
- php_parser_py/_printer.py,sha256=2HnN8KWFS8nIkBCTqiPmr5KibtXGIF4-K1597aOJ7Js,7089
18
+ php_parser_py/_printer.py,sha256=Q3DKNJEPRU8Md4WCS0-sJ-u6MLmc8qHL-6NxFmBqNhk,7070
19
19
  php_parser_py/_resources/ExtendedPrinter.php,sha256=hwo0R1v2nth5HCgMmOXMTQLVTsVI9YbWnVt4JC_fLiY,9588
20
20
  php_parser_py/_resources/parse.php,sha256=gp8sDVHvcjrRUd7zvUZZFi88Ecedv-AaZyTF-piDMAw,5081
21
21
  php_parser_py/_resources/php-parser-5.7.0.tar.gz,sha256=CeU5G4YHMA__oybtkqM3dNW07VlcSLOUl2eQWpLklFs,143662
@@ -23,17 +23,17 @@ php_parser_py/_resources/print.php,sha256=CmGspnhYKb_oRHaFmkk8l6rtmyQiYYT2TVHpR6
23
23
  php_parser_py/_resources/transport.php,sha256=WTkEf85Lx8rQ9gojqWC1aGo7tp3XR148M1o8B1OR2K4,6767
24
24
  php_parser_py/_runtime/__init__.py,sha256=gKauz8DvQxNUQyNMLfPgy08tEoyIxXsmWb_96bHheJE,223
25
25
  php_parser_py/_runtime/_binary.py,sha256=GiSZ0zPKuDzmuKjBI4qvKShHqoXPn9d6z0OtIkoRSuU,4263
26
- php_parser_py/_runtime/_bundle.py,sha256=00iYkKPU4foeJIVumZ0NPi5WdQptTcjSAyni8qeijZs,8904
26
+ php_parser_py/_runtime/_bundle.py,sha256=H6qydI1SJ_PvjR4TZBjANUF9KnmB32JTrnzIjNPMKlo,8872
27
27
  php_parser_py/_runtime/_runner.py,sha256=AjlfXfReooGO_cLq5y5Sfx-nEYHw-vSX37p-quhU0Vk,9907
28
28
  php_parser_py/_transport.py,sha256=J4qo0c8gBEGv05Vww59QnkDZ1R0Bjzrjtr8mV2xbCjo,3873
29
29
  php_parser_py/_types.py,sha256=-QouaEd_AlYkGJ6apiOee0IFDR23S7Ub20qCfT0DUc8,4511
30
- php_parser_py/_version.py,sha256=mZHrNWj7_5HQmQudel4xf6wTpm_uFgh9aiZBVoPWrII,1405
30
+ php_parser_py/_version.py,sha256=RQg6MI9DSur10aT6OFtPfbVt_v5LD4X3nm2ceib-0dc,1386
31
31
  php_parser_py/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
32
  php_parser_py/_resources/php.exe,sha256=yv_KdAxqo8Pc_xrwnCjdBA2_jn24PL1V4TB1Aey34vY,9529856
33
- php_parser_py-3.0.1.dist-info/METADATA,sha256=12_4XqdgQzgF8kjFVkVXVDGVDTGZfPRCdXamxE_Rdw0,3343
34
- php_parser_py-3.0.1.dist-info/WHEEL,sha256=eOph205RIaepfK4qdVVjtNnzanETS7NC0N2C0Ks5Yc8,104
35
- php_parser_py-3.0.1.dist-info/licenses/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
36
- php_parser_py-3.0.1.dist-info/licenses/PHP-LICENSE,sha256=tC5N9eUObs2hBH1QPW2R1xAy0J7RAnuh7ynu0m-JDFo,3204
37
- php_parser_py-3.0.1.dist-info/licenses/PHP-Parser-LICENSE,sha256=3YWeEH-sn4ekQTq4w8lvDxYRoX9Zai21YqWk9JBMHpc,1520
38
- php_parser_py-3.0.1.dist-info/licenses/Zend-Engine-LICENSE,sha256=UJrrO-ZOQo1-AATOIkYgqwG_lK2qzvu0SWEZOd9WvFs,2803
39
- php_parser_py-3.0.1.dist-info/RECORD,,
33
+ php_parser_py-3.0.2.dist-info/METADATA,sha256=nX8paGA_3kkijNOmn_F5wa5Myp6zYQPKP6YxFdS-BNI,3343
34
+ php_parser_py-3.0.2.dist-info/WHEEL,sha256=eOph205RIaepfK4qdVVjtNnzanETS7NC0N2C0Ks5Yc8,104
35
+ php_parser_py-3.0.2.dist-info/licenses/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
36
+ php_parser_py-3.0.2.dist-info/licenses/PHP-LICENSE,sha256=tC5N9eUObs2hBH1QPW2R1xAy0J7RAnuh7ynu0m-JDFo,3204
37
+ php_parser_py-3.0.2.dist-info/licenses/PHP-Parser-LICENSE,sha256=3YWeEH-sn4ekQTq4w8lvDxYRoX9Zai21YqWk9JBMHpc,1520
38
+ php_parser_py-3.0.2.dist-info/licenses/Zend-Engine-LICENSE,sha256=UJrrO-ZOQo1-AATOIkYgqwG_lK2qzvu0SWEZOd9WvFs,2803
39
+ php_parser_py-3.0.2.dist-info/RECORD,,