Skip to content

Commit

Permalink
feat: ensure consistent ordering in generated __init__.pyi files
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusvniekerk authored and cpcloud committed Feb 14, 2023
1 parent f2b4b1e commit 9fca603
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion protoletariat/fdsetgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def _create_pyi_init(root: Path) -> None:
# use a dictionary to preserve order while deduplicating
lines_to_write = {
f"from . import {path.stem}\n": None
for path in root.glob("*")
for path in sorted(root.glob("*"))
if path.stem not in ("__init__", "__pycache__")
if path.suffix == ".pyi" or path.is_dir()
}
Expand Down

0 comments on commit 9fca603

Please sign in to comment.