fix bad regular expressions and docstrings with '\'
This commit is contained in:
parent
1137b183e3
commit
a41bce2148
@ -460,11 +460,11 @@ def pretty_string_to_date(date_str, now=None):
|
||||
now = now or datetime.now()
|
||||
|
||||
# datetime formats
|
||||
pattern[re.compile('^\d{4}$')] = lambda x: datetime.strptime(x, '%Y')
|
||||
pattern[re.compile('^\d{4}-\d{2}$')] = lambda x: datetime.strptime(
|
||||
pattern[re.compile(r'^\d{4}$')] = lambda x: datetime.strptime(x, '%Y')
|
||||
pattern[re.compile(r'^\d{4}-\d{2}$')] = lambda x: datetime.strptime(
|
||||
x, '%Y-%m'
|
||||
)
|
||||
pattern[re.compile('^\d{4}-\d{2}-\d{2}$')] = lambda x: datetime.strptime(
|
||||
pattern[re.compile(r'^\d{4}-\d{2}-\d{2}$')] = lambda x: datetime.strptime(
|
||||
x, '%Y-%m-%d'
|
||||
)
|
||||
|
||||
|
@ -310,7 +310,7 @@ def mutable_config(tmpdir_factory, configuration_dir, config):
|
||||
|
||||
|
||||
def _populate(mock_db):
|
||||
"""Populate a mock database with packages.
|
||||
r"""Populate a mock database with packages.
|
||||
|
||||
Here is what the mock DB looks like:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user