Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Change docstring grammar
Co-authored-by: Éric <merwok@netwok.org>
  • Loading branch information
hugovk and merwok authored Jul 26, 2023
commit acc9e059b590e97260ff54bd65c1db2cb15ae11c
4 changes: 2 additions & 2 deletions blurb/blurb.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@

def sanitize_section(section):
"""
Cleans up a section string, making it viable as a directory name.
Clean up a section string, making it viable as a directory name.
"""
return section.replace("/", "-").replace(" ", "_")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make things more explicit/readable, this could use a dict similar to the one used below for unsanitize_section.
If new sections that require sanitation are added in the future the function won't work, but it will serve as a reminder to update both dicts.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.



def sanitize_section_legacy(section):
"""
Cleans up a section string, making it viable as a directory name (allow spaces).
Clean up a section string, making it viable as a directory name (allow spaces).
"""
return section.replace("/", "-")

Expand Down