mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 02:26:53 -07:00
Fix flake8-docstrings D205 1 blank line required between summary line and description
This commit is contained in:
parent
777bc7e35d
commit
1d7dba8aeb
4 changed files with 24 additions and 11 deletions
|
@ -3,6 +3,8 @@ import re
|
|||
|
||||
def sanitize_name(name):
|
||||
"""
|
||||
Remove bad chars from the filename.
|
||||
|
||||
>>> sanitize_name('a/b/c')
|
||||
'a-b-c'
|
||||
>>> sanitize_name('abc')
|
||||
|
@ -12,7 +14,6 @@ def sanitize_name(name):
|
|||
>>> sanitize_name('.a.b..')
|
||||
'a.b'
|
||||
"""
|
||||
# remove bad chars from the filename
|
||||
name = re.sub(r'[\\/*]', '-', name)
|
||||
name = re.sub(r'[:\'<>|?]', '', name)
|
||||
|
||||
|
@ -27,8 +28,8 @@ def sanitize_name(name):
|
|||
|
||||
|
||||
def clean_file_name(filename):
|
||||
"""Cleans up nzb name by removing any . and _
|
||||
characters, along with any trailing hyphens.
|
||||
"""
|
||||
Cleans up nzb name by removing any . and _ characters and trailing hyphens.
|
||||
|
||||
Is basically equivalent to replacing all _ and . with a
|
||||
space, but handles decimal numbers in string, for example:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue