diff --git a/src/omero/cli.py b/src/omero/cli.py index 91eae68ab..b0d845a8b 100755 --- a/src/omero/cli.py +++ b/src/omero/cli.py @@ -665,7 +665,7 @@ class MyControl(BaseControl): def _configure(self, parser): self.add_error("NAME", 100, "some message: %s") ... - def __call__(self, \*args): + def __call__(self, *args): self.raise_error("NAME", "my text") """ diff --git a/src/omero/install/win_set_path.py b/src/omero/install/win_set_path.py index 10f27a93a..9bd908555 100755 --- a/src/omero/install/win_set_path.py +++ b/src/omero/install/win_set_path.py @@ -20,7 +20,7 @@ def win_set_path(new_name=dummy, old_name=r"c:\omero_dist", dir=path(".")): - """ + r""" Parses the Windows cfg and xml files and replaces the default "c:\omero_dist" with the given value. @@ -77,7 +77,7 @@ def win_set_path(new_name=dummy, old_name=r"c:\omero_dist", dir=path(".")): print("Failed to set path: ", e) sys.exit(1) - print("""Usage: %s [oldname] newname + print(r"""Usage: %s [oldname] newname Replaces the [oldname] entries in the Windows configuration files with [newname]. By default, [oldname] is set to "c:\omero_dist" diff --git a/src/omero/util/cleanse.py b/src/omero/util/cleanse.py index 237cb7f35..1cc5658c7 100644 --- a/src/omero/util/cleanse.py +++ b/src/omero/util/cleanse.py @@ -162,20 +162,20 @@ def do_cleanse(self): if object_id.val not in existing_ids: if object_id.val == -1: if self.dry_run: - print(" \_ %s (ignored/keep)" % path) + print(r" \_ %s (ignored/keep)" % path) else: size = os.stat(path)[ST_SIZE] self.cleansed.append(path) self.bytes_cleansed = size if self.dry_run: - print(" \_ %s (remove)" % path) + print(r" \_ %s (remove)" % path) else: try: os.unlink(path) except OSError as e: print(e) elif self.dry_run: - print(" \_ %s (keep)" % path) + print(r" \_ %s (keep)" % path) self.deferred_paths = list() def finalize(self): @@ -260,7 +260,7 @@ def delete_empty_dirs(repo, root, client, dry_run): if dry_run: for directory in to_delete: - print(" \_ %s%s (remove)" % (root, directory)) + print(r" \_ %s%s (remove)" % (root, directory)) elif to_delete: # probably less than a screenful batch_size = 20 diff --git a/src/omero/util/importperf.py b/src/omero/util/importperf.py index 5a11bc391..8ee11b43f 100755 --- a/src/omero/util/importperf.py +++ b/src/omero/util/importperf.py @@ -103,8 +103,8 @@ class ImporterLog(object): # Regular expression for matching log4j log lines log_regex = re.compile( r'^(?P\S+\s+\S+)\s+(?P\d+)\s+' - '(?P\[.*?\])\s+(?P\S+)\s+(?P\S+)\s+-\s+' - '(?P.*)$') + r'(?P\[.*?\])\s+(?P\S+)\s+(?P\S+)\s+-\s+' + r'(?P.*)$') # Regular expression for matching possible OMERO.importer status messages status_regex = re.compile(r'^[A-Z_]*')