MCPcopy
hub / github.com/reflex-dev/reflex / initialize

Method initialize

scripts/hatch_build.py:27–47  ·  view source on GitHub ↗

Initialize the build hook. Args: version: The version being built. build_data: Additional build data.

(self, version: str, build_data: dict[str, Any])

Source from the content-addressed store, hash-verified

25 )
26
27 def initialize(self, version: str, build_data: dict[str, Any]) -> None:
28 """Initialize the build hook.
29
30 Args:
31 version: The version being built.
32 build_data: Additional build data.
33 """
34 if self.marker().exists():
35 return
36
37 if not (pathlib.Path(self.root) / "scripts").exists():
38 return
39
40 for file in (pathlib.Path(self.root) / "reflex").rglob("**/*.pyi"):
41 file.unlink(missing_ok=True)
42
43 subprocess.run(
44 [sys.executable, "-m", "reflex_base.utils.pyi_generator"],
45 check=True,
46 )
47 self.marker().touch()

Callers

nothing calls this directly

Calls 3

markerMethod · 0.95
existsMethod · 0.80
unlinkMethod · 0.80

Tested by

no test coverage detected