Fix flake8-docstrings D205 1 blank line required between summary line and description

This commit is contained in:
Labrys of Knossos 2019-04-05 15:02:50 -04:00
commit 1d7dba8aeb
4 changed files with 24 additions and 11 deletions

View file

@ -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: