openrewrite-remote 0.22.1__py3-none-any.whl → 0.23.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openrewrite-remote
3
- Version: 0.22.1
3
+ Version: 0.23.0
4
4
  Summary: Remoting functionality for the OpenRewrite library.
5
5
  Author-email: "Moderne Inc." <support@moderne.io>
6
6
  License: Moderne, Inc. Commercial License
@@ -13,13 +13,13 @@ rewrite_remote/handlers/hello_world_handler.py,sha256=HLVukS16-PRRidlnfABT6ETXUR
13
13
  rewrite_remote/handlers/list_projects_handler.py,sha256=jJ39BXXdbZ43YeL-23gpRzravYQQaSgTM3aIMdR4CzI,2039
14
14
  rewrite_remote/handlers/parse_project_sources_handler.py,sha256=VeRmBrQKtWuOLdDT1CDku9xa998nl-c1RDQCAAJPipM,3153
15
15
  rewrite_remote/handlers/parse_source_handler.py,sha256=5GAarluCBGq8YjDIN9ddlUK7o0uhr29xBXvxAs8EoME,1431
16
- rewrite_remote/handlers/project_helper.py,sha256=La2lQnS158PevXE1z2Jnx_RNQwQtioelthzdNEJnIew,8711
16
+ rewrite_remote/handlers/project_helper.py,sha256=8z6-aDt36Tx6176vUJh9mowq6DBiikFHmQtPWlQjIN0,8828
17
17
  rewrite_remote/handlers/pypi_manager.py,sha256=XulTdZUm5aTme7Qn-jaUvlgO6N9bKS03UUQtbxv9kYE,10247
18
18
  rewrite_remote/handlers/recipe_install_handler.py,sha256=brUAeQeGsXHBLMG1TXfdF8q0x7vx_foY5UfLgOBHQ6c,4976
19
19
  rewrite_remote/handlers/run_recipe_load_and_visitor_handler.py,sha256=aLTi4LRBffDyC9pzaZiulj8Q8KwWta_y71aIPJXUJLc,4418
20
20
  rewrite_remote/handlers/types.py,sha256=5TK_oFp-7iy1iACWisuQJsa_WHTsqcPrV9nQTZ-_xgo,518
21
- openrewrite_remote-0.22.1.dist-info/METADATA,sha256=qutmUcAPpMwjP5Sj8-Vm8XbeVd5frGDWXXEMPZATb4I,386
22
- openrewrite_remote-0.22.1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
23
- openrewrite_remote-0.22.1.dist-info/entry_points.txt,sha256=SMukuF7TPjQr3IZIcH8f98-_QBCqYSbYXYrVv-5UzRI,69
24
- openrewrite_remote-0.22.1.dist-info/top_level.txt,sha256=ansTioSZ-62aH3F2L3d1Bua0pJF4GOtgQ1PpG-CzcP0,15
25
- openrewrite_remote-0.22.1.dist-info/RECORD,,
21
+ openrewrite_remote-0.23.0.dist-info/METADATA,sha256=ILCRehy_sGwsVLnKaKwAUuqKuPKjX7k7QzhnNae4O80,386
22
+ openrewrite_remote-0.23.0.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
23
+ openrewrite_remote-0.23.0.dist-info/entry_points.txt,sha256=SMukuF7TPjQr3IZIcH8f98-_QBCqYSbYXYrVv-5UzRI,69
24
+ openrewrite_remote-0.23.0.dist-info/top_level.txt,sha256=ansTioSZ-62aH3F2L3d1Bua0pJF4GOtgQ1PpG-CzcP0,15
25
+ openrewrite_remote-0.23.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.1.0)
2
+ Generator: setuptools (79.0.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,7 +1,7 @@
1
1
  import os
2
2
  import glob
3
3
  import toml
4
- from typing import Any, List, Iterable
4
+ from typing import Any, List, Iterable, Callable
5
5
  from pathlib import Path
6
6
  from io import StringIO
7
7
 
@@ -222,6 +222,10 @@ def read_file_contents(path: str) -> StringIO:
222
222
  return StringIO(file.read())
223
223
 
224
224
 
225
+ def _file_content_provider(path: str) -> Callable[[], StringIO]:
226
+ return lambda: read_file_contents(path)
227
+
228
+
225
229
  def parse_python_sources(paths: List[str]) -> List[SourceFile]:
226
230
  """
227
231
  Parse the given python files and return a list of SourceFile objects
@@ -235,7 +239,7 @@ def parse_python_sources(paths: List[str]) -> List[SourceFile]:
235
239
  Path(path),
236
240
  None,
237
241
  True,
238
- lambda: read_file_contents(path),
242
+ _file_content_provider(path),
239
243
  )
240
244
  for path in paths
241
245
  ],