Remove redundant open() flags
This commit is contained in:
parent
9141483527
commit
de3d930421
2 changed files with 2 additions and 2 deletions
2
setup.py
2
setup.py
|
|
@ -44,7 +44,7 @@ Authors:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
VERSIONFILE = os.path.join(os.path.dirname(os.path.realpath(__file__)), "scour", "__init__.py")
|
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['\"]([^'\"]*)['\"]"
|
VSRE = r"^__version__ = u['\"]([^'\"]*)['\"]"
|
||||||
mo = re.search(VSRE, verstrline, re.M)
|
mo = re.search(VSRE, verstrline, re.M)
|
||||||
if mo:
|
if mo:
|
||||||
|
|
|
||||||
|
|
@ -2736,7 +2736,7 @@ class EmbedRasters(unittest.TestCase):
|
||||||
"Raster image from local path '" + href + "' not embedded.")
|
"Raster image from local path '" + href + "' not embedded.")
|
||||||
|
|
||||||
def test_raster_paths_local_absolute(self):
|
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()
|
svg = f.read()
|
||||||
|
|
||||||
# create a reference string by scouring the original file with relative links
|
# create a reference string by scouring the original file with relative links
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue