Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

blurb: replace spaces with underscores in news directory#499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ambv merged 17 commits intopython:mainfromhugovk:no-spaces
Mar 6, 2024
Merged
Changes from1 commit
Commits
Show all changes
17 commits
Select commitHold shift + click to select a range
0367715
Remove unused code
hugovkMar 28, 2023
535fc6a
Add tests
hugovkMar 28, 2023
3a84a69
Add some type annotations
hugovkMar 28, 2023
67869b3
Use dashes instead of spaces in paths
hugovkMar 28, 2023
36bd99f
Don't install flit
hugovkMar 29, 2023
66bc9e0
Build and install package, then test installed package
hugovkMar 29, 2023
e69848d
Install build
hugovkMar 29, 2023
e68c9fe
Install in place for easier test coverage
hugovkMar 30, 2023
9bb59f4
Test on Python 3.12
hugovkJul 23, 2023
53ca535
Remove type hints
hugovkJul 23, 2023
f98656d
Use underscores instead of dashes for spaces
hugovkJul 23, 2023
53cae52
Sort the *normalized* filenames for blurb release.
larryhastingsJul 23, 2023
8e53d4a
Add glob_blurbs test for sorting by filename
hugovkJul 23, 2023
acc9e05
Change docstring grammar
hugovkJul 26, 2023
22b23c9
Merge branch 'main' into no-spaces
hugovkDec 26, 2023
3e0a0ba
Merge remote-tracking branch 'upstream/main' into no-spaces
hugovkJan 17, 2024
f63fea1
Replace replace.replace with dict.get
hugovkJan 17, 2024
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
PrevPrevious commit
NextNext commit
Change docstring grammar
Co-authored-by: Éric <merwok@netwok.org>
  • Loading branch information
@hugovk@merwok
hugovk andmerwok authoredJul 26, 2023
commitacc9e059b590e97260ff54bd65c1db2cb15ae11c
4 changes: 2 additions & 2 deletionsblurb/blurb.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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 adict similar to the one used below forunsanitize_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 bothdicts.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Updated.

ezio-melotti reacted with thumbs up emoji


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

[8]ページ先頭

©2009-2025 Movatter.jp