Skip to content

Commit 3b4bfb6

Browse files
committed
Fix docstrings and update makefile
1 parent 0b50534 commit 3b4bfb6

File tree

6 files changed

+6
-13
lines changed

6 files changed

+6
-13
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Show help, place this first so it runs with just `make`
22
help:
33
@printf "\nCommands:\n"
4-
@printf "\033[32mcheck\033[0m run ruff linter and formatter checks\n"
5-
@printf "\033[32mclean\033[0m remove cache directories\n"
6-
@printf "\033[32mtest\033[0m run unit tests with pytest\n"
7-
@printf "\033[32mpublish\033[0m build and upload package to PyPI\n"
4+
@printf "\033[32mcheck\033[0m run ruff linter and formatter checks\n"
5+
@printf "\033[32mclean\033[0m remove cache directories\n"
6+
@printf "\033[32mtest\033[0m run unit tests with pytest\n"
7+
@printf "\033[32mpublish\033[0m build and upload package to PyPI\n"
88

99
check:
1010
@printf "\n\033[32mRun ruff linter checks\033[0m\n"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ line-length = 100
3232

3333
[tool.ruff.lint]
3434
extend-select = ["E501", "D"]
35-
ignore = ["D200", "D202", "D212"]
35+
ignore = ["D200", "D212"]
3636

3737
[tool.ruff.lint.pydocstyle]
3838
convention = "numpy"

src/genja/builder.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ def __init__(self, config: dict[str, str]):
2828

2929
def build_markdown_pages(self, template, md):
3030
"""Build the Markdown HTML pages."""
31-
3231
pages = [] # Store page dictionaries for Markdown and HTML templates
3332
feeds = [] # Store feed dictionaries for JSON feed template
3433

@@ -98,7 +97,6 @@ def build_html_pages(self, templates, names, pages):
9897
pages : list of dict
9998
The dictionaries that describe the Markdown pages.
10099
"""
101-
102100
# Sort page dictionaries using category and title
103101
sorted_pages = sorted(pages, key=itemgetter("category", "title"))
104102

@@ -115,7 +113,6 @@ def build_html_pages(self, templates, names, pages):
115113

116114
def build_json_feed(self, template, feeds):
117115
"""Build the JSON feed."""
118-
119116
# Sort feed dictionaries using date
120117
sorted_feeds = sorted(feeds, key=itemgetter("date"), reverse=True)
121118

src/genja/main.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
def run_builder(config):
1515
"""Build the website."""
16-
1716
# Setup the Markdown converter
1817
md = markdown.Markdown(extensions=["meta", "fenced_code"])
1918

@@ -44,7 +43,6 @@ def run_builder(config):
4443

4544
def remove_files(config):
4645
"""Remove the generated HTML and JSON feed files."""
47-
4846
markdown_path = Path(config["markdown_dir"])
4947
template_path = Path(config["template_dir"])
5048
output_path = Path(config["output_dir"])
@@ -80,7 +78,6 @@ def remove_files(config):
8078

8179
def main():
8280
"""Run the genja program."""
83-
8481
# Command line arguments
8582
parser = argparse.ArgumentParser(description="Genja static site generator for GitHub Pages")
8683
parser.add_argument("command", choices=["build", "serve", "clean"], help="genja commands")

src/genja/server.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ def run_server(config):
1616
Configuration dictionary that contains `base_url`, `markdown_dir`, and
1717
`output_dir` keys.
1818
"""
19-
2019
# Get the Markdown and output directories
2120
markdown_dir = config["markdown_dir"]
2221
output_dir = config["output_dir"]

tests/test_builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def test_init():
1313
"base_url": "https://example.com/testsite",
1414
"markdown_dir": "mdcontent",
1515
"template_dir": "templates",
16-
"output_dir": "website"
16+
"output_dir": "website",
1717
}
1818

1919
builder = Builder(config)

0 commit comments

Comments
 (0)