Skip to content

Commit c5389c6

Browse files
Eric Lopesnullhack
andcommitted
bkp (#18)
Co-authored-by: Eric Lopes <nullhack@users.noreply.github.com> Reviewed-on: https://gitea.eol.myds.me/cluster-projects/python-project-template/pulls/18
1 parent eb7bc4a commit c5389c6

File tree

6 files changed

+100
-140
lines changed

6 files changed

+100
-140
lines changed

{{cookiecutter.project_slug}}/docs/gen_pages.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# Automagically injects README file into the documentation
1515
readme_path = docs_parent_dir / "README.md"
1616
if readme_path.exists():
17-
with open(readme_path, "r") as r, mkdocs_gen_files.open(
17+
with Path.open(readme_path, "r") as r, mkdocs_gen_files.open(
1818
"readme.md", "w"
1919
) as f:
2020
f.write(r.read())
@@ -32,16 +32,16 @@
3232
ignore_lines = ("@", "#")
3333
features_dir = docs_parent_dir / "bdd-features"
3434
for feature_path in features_dir.glob("**/*.feature"):
35-
with open(feature_path, "r") as f:
35+
with Path.open(feature_path, "r") as f:
3636
relative_dir = feature_path.parent.relative_to(features_dir)
3737
with mkdocs_gen_files.open(
3838
f"scenarios/{relative_dir}/{feature_path.stem}.md", "w"
3939
) as gf:
4040
f_line_list = f.readlines()
4141
for line in f_line_list:
42-
if any([line.strip().startswith(hl) for hl in head_lines]):
42+
if any(line.strip().startswith(hl) for hl in head_lines):
4343
write_line = f"### {line}\n"
44-
elif any([line.strip().startswith(il) for il in ignore_lines]):
44+
elif any(line.strip().startswith(il) for il in ignore_lines):
4545
continue
4646
else:
4747
write_line = f"> {line}"

0 commit comments

Comments
 (0)