From de3d930421db30470f4c5e8f18a49ed0fe5dd0ee Mon Sep 17 00:00:00 2001 From: Nikita Karamov Date: Mon, 23 Jan 2023 06:51:43 +0100 Subject: [PATCH] Remove redundant open() flags --- setup.py | 2 +- test_scour.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 5336a3c..419fb42 100644 --- a/setup.py +++ b/setup.py @@ -44,7 +44,7 @@ Authors: """ VERSIONFILE = os.path.join(os.path.dirname(os.path.realpath(__file__)), "scour", "__init__.py") -verstrline = open(VERSIONFILE, "rt").read() +verstrline = open(VERSIONFILE).read() VSRE = r"^__version__ = u['\"]([^'\"]*)['\"]" mo = re.search(VSRE, verstrline, re.M) if mo: diff --git a/test_scour.py b/test_scour.py index 44db11f..f5217b1 100755 --- a/test_scour.py +++ b/test_scour.py @@ -2736,7 +2736,7 @@ class EmbedRasters(unittest.TestCase): "Raster image from local path '" + href + "' not embedded.") def test_raster_paths_local_absolute(self): - with open('unittests/raster-formats.svg', 'r') as f: + with open('unittests/raster-formats.svg') as f: svg = f.read() # create a reference string by scouring the original file with relative links