diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/llnl/util/lang.py | 6 | ||||
-rw-r--r-- | lib/spack/spack/test/conftest.py | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/spack/llnl/util/lang.py b/lib/spack/llnl/util/lang.py index b2d582db5a..0a86896f5b 100644 --- a/lib/spack/llnl/util/lang.py +++ b/lib/spack/llnl/util/lang.py @@ -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' ) diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py index a13444a1a8..9fe53b8f66 100644 --- a/lib/spack/spack/test/conftest.py +++ b/lib/spack/spack/test/conftest.py @@ -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: |