Remove redundant open() flags

This commit is contained in:
Nikita Karamov 2023-01-23 06:51:43 +01:00
parent 9141483527
commit de3d930421
No known key found for this signature in database
GPG key ID: 41D6F71EE78E77CD
2 changed files with 2 additions and 2 deletions

View file

@ -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:

View file

@ -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