Skip to content

Commit

Permalink
Resolve all W605 invalid escape sequence flake8 errors. https://lintl…
Browse files Browse the repository at this point in the history
  • Loading branch information
Coop56 committed Mar 20, 2019
1 parent f9d6e40 commit 80c5b1b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion geonode/contrib/createlayer/tests.py
Expand Up @@ -32,7 +32,7 @@
from .utils import create_layer


"""
r"""
How to run the tests
--------------------
Expand Down
2 changes: 1 addition & 1 deletion geonode/geoserver/helpers.py
Expand Up @@ -822,7 +822,7 @@ def set_attributes_from_geoserver(layer, overwrite=False):
logger.debug(tb)
attribute_map = []
elif layer.storeType in ["dataStore", "remoteStore", "wmsStore"]:
dft_url = re.sub("\/wms\/?$",
dft_url = re.sub(r"\/wms\/?$",
"/",
server_url) + "ows?" + urllib.urlencode({"service": "wfs",
"version": "1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion geonode/proxy/views.py
Expand Up @@ -57,7 +57,7 @@
custom_slugify = Slugify(separator='_')

ows_regexp = re.compile(
"^(?i)(version)=(\d\.\d\.\d)(?i)&(?i)request=(?i)(GetCapabilities)&(?i)service=(?i)(\w\w\w)$")
r"^(?i)(version)=(\d\.\d\.\d)(?i)&(?i)request=(?i)(GetCapabilities)&(?i)service=(?i)(\w\w\w)$")


@requires_csrf_token
Expand Down
2 changes: 1 addition & 1 deletion geonode/tests/integration.py
Expand Up @@ -102,7 +102,7 @@ def zip_dir(basedir, archivename):
z.write(absfn, zfn)


"""
r"""
HOW TO RUN THE TESTS
--------------------
(https://github.com/GeoNode/geonode/blob/master/docs/tutorials/devel/testing.txt)
Expand Down
6 changes: 3 additions & 3 deletions geonode/upload/utils.py
Expand Up @@ -55,7 +55,7 @@ def _log(msg, *args):
iso8601 = re.compile(r'^(?P<full>((?P<year>\d{4})([/-]?(?P<mon>(0[1-9])|(1[012]))' +
r'([/-]?(?P<mday>(0[1-9])|([12]\d)|(3[01])))?)?(?:T(?P<hour>([01][0-9])' +
r'|(?:2[0123]))(\:?(?P<min>[0-5][0-9])(\:?(?P<sec>[0-5][0-9]([\,\.]\d{1,10})?))?)' +
'?(?:Z|([\-+](?:([01][0-9])|(?:2[0123]))(\:?(?:[0-5][0-9]))?))?)?))$').match
r'?(?:Z|([\-+](?:([01][0-9])|(?:2[0123]))(\:?(?:[0-5][0-9]))?))?)?))$').match

_SUPPORTED_CRS = getattr(settings, 'UPLOADER', None)
if _SUPPORTED_CRS:
Expand Down Expand Up @@ -745,7 +745,7 @@ def make_geogig_rest_payload(author_name='admin',
pg_geogig_db = settings.DATABASES[datastore]
schema = 'public'
if 'OPTIONS' in pg_geogig_db and 'options' in pg_geogig_db['OPTIONS']:
detected_schemas = re.findall('((?<=search_path=).*)\s?',
detected_schemas = re.findall(r'((?<=search_path=).*)\s?',
pg_geogig_db['OPTIONS']['options'])
if len(detected_schemas) > 0:
schemas = detected_schemas[0]
Expand Down Expand Up @@ -920,7 +920,7 @@ def import_imagemosaic_granules(
CheckAuxiliaryMetadata={aux_metadata_flag}
SuggestedSPI=it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReaderSpi"""

datastore_template = """SPI=org.geotools.data.postgis.PostgisNGDataStoreFactory
datastore_template = r"""SPI=org.geotools.data.postgis.PostgisNGDataStoreFactory
host={db_host}
port={db_port}
database={db_name}
Expand Down

0 comments on commit 80c5b1b

Please sign in to comment.