Skip to content

Commit a3ee37d

Browse files
authored
Merge pull request lightspeed-core#1670 from tisnik/lcore-2105
LCORE-2105: Improper type hints
2 parents 35cc43c + 6f8ec71 commit a3ee37d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

scripts/gen_doc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
DIRECTORIES = ["src", "tests/unit", "tests/integration", "tests/e2e"]
1010

1111

12-
def generate_docfile(directory):
12+
def generate_docfile(directory: Path) -> None:
1313
"""
1414
Write or overwrite a README.md in the current working directory with module docstring summaries.
1515
@@ -42,7 +42,7 @@ def generate_docfile(directory):
4242
print(file=indexfile)
4343

4444

45-
def generate_documentation_on_path(path):
45+
def generate_documentation_on_path(path: Path) -> None:
4646
"""Generate documentation for all the sources found in path.
4747
4848
This function generate README.md for Python sources in the given directory.
@@ -62,10 +62,10 @@ def generate_documentation_on_path(path):
6262
os.chdir(cwd)
6363

6464

65-
def main():
65+
def main() -> None:
6666
"""Entry point to this script, regenerates documentation in all directories."""
6767
for directory in DIRECTORIES:
68-
generate_documentation_on_path(f"{directory}/")
68+
generate_documentation_on_path(Path(f"{directory}/"))
6969
for path in Path(directory).rglob("*"):
7070
if path.is_dir():
7171
# LCORE-679: Script to generate documentation should create

0 commit comments

Comments
 (0)