Skip to content

Commit 971f171

Browse files
Merge branch 'master' into fix-reverse-bits
2 parents 31122a5 + 9ddb027 commit 971f171

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
<a href="https://github.com/pre-commit/pre-commit">
2828
<img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=flat-square" height="20" alt="pre-commit">
2929
</a>
30-
<a href="https://github.com/psf/black">
31-
<img src="https://img.shields.io/static/v1?label=code%20style&message=black&color=black&style=flat-square" height="20" alt="code style: black">
30+
<a href="https://docs.astral.sh/ruff/formatter/">
31+
<img src="https://img.shields.io/static/v1?label=code%20style&message=ruff&color=black&style=flat-square" height="20" alt="code style: black">
3232
</a>
3333
<!-- Short description: -->
3434
<h3>All algorithms implemented in Python - for education</h3>

scripts/build_directory_md.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,20 @@ def good_file_paths(top_dir: str = ".") -> Iterator[str]:
1818
yield os.path.join(dir_path, filename).lstrip("./")
1919

2020

21-
def md_prefix(i):
22-
return f"{i * ' '}*" if i else "\n##"
21+
def md_prefix(indent: int) -> str:
22+
"""
23+
Markdown prefix based on indent for bullet points
24+
25+
>>> md_prefix(0)
26+
'\\n##'
27+
>>> md_prefix(1)
28+
' *'
29+
>>> md_prefix(2)
30+
' *'
31+
>>> md_prefix(3)
32+
' *'
33+
"""
34+
return f"{indent * ' '}*" if indent else "\n##"
2335

2436

2537
def print_path(old_path: str, new_path: str) -> str:

0 commit comments

Comments
 (0)