Merge pull request #124 from roberthdevries/remove-redundant-open-modes

Remove redundant open modes.
pull/129/head
David Garske 2026-06-08 15:45:07 -07:00 committed by GitHub
commit 3c911eeb29
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -321,7 +321,7 @@ def get_features(local_wolfssl, features):
"fips.h")
if fips_file and os.path.exists(fips_file):
with open(fips_file, "r") as f:
with open(fips_file) as f:
contents = f.read()
if not contents.isspace():
fips = True
@ -347,7 +347,7 @@ def get_features(local_wolfssl, features):
defines = []
for file in defines_files:
with open(file, 'r') as f:
with open(file) as f:
defines += f.read().splitlines()
features["MPAPI"] = 1 if '#define WOLFSSL_PUBLIC_MP' in defines else 0

View File

@ -28,7 +28,7 @@ from setuptools import setup, find_packages
os.chdir(os.path.dirname(sys.argv[0]) or ".")
VERSIONFILE = "wolfcrypt/_version.py"
verstrline = open(VERSIONFILE, "rt").read()
verstrline = open(VERSIONFILE).read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo: