diff --git a/pyproject.toml b/pyproject.toml index ac49ed9c..e271bdff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,5 +57,9 @@ extend-exclude = ["bench"] extend-select = [ "B", "I", + "SIM", "UP", ] +ignore = [ + "SIM108", +] diff --git a/setup.py b/setup.py index 3a55a00d..734e8b63 100644 --- a/setup.py +++ b/setup.py @@ -9,9 +9,11 @@ from skbuild import setup # Blosc version -VERSION = open("VERSION").read().strip() +with open("VERSION") as f: + VERSION = f.read().strip() # Create the version.py file -open("blosc2/version.py", "w").write(f'__version__ = "{VERSION}"\n') +with open("blosc2/version.py", "w") as f: + f.write(f'__version__ = "{VERSION}"\n') def exclude_pkgconfig(cmake_manifest):