Browse Source

use as posix (#5192)

Khaleel Al-Adhami 2 weeks ago
parent
commit
dccfc81164
1 changed files with 5 additions and 4 deletions
  1. 5 4
      reflex/utils/pyi_generator.py

+ 5 - 4
reflex/utils/pyi_generator.py

@@ -1264,7 +1264,7 @@ class PyiGenerator:
                         dict(
                             zip(
                                 [
-                                    str(f.relative_to(pyi_hashes_file.parent))
+                                    f.relative_to(pyi_hashes_file.parent).as_posix()
                                     for f in file_paths
                                 ],
                                 hashes,
@@ -1291,9 +1291,10 @@ class PyiGenerator:
                     for file_path, hashed_content in zip(
                         file_paths, hashes, strict=False
                     ):
-                        pyi_hashes[str(file_path.relative_to(pyi_hashes_parent))] = (
-                            hashed_content
-                        )
+                        formatted_path = file_path.relative_to(
+                            pyi_hashes_parent
+                        ).as_posix()
+                        pyi_hashes[formatted_path] = hashed_content
 
                     pyi_hashes_file.write_text(
                         json.dumps(pyi_hashes, indent=2, sort_keys=True) + "\n"