Skip to content

Commit 0d1501c

Browse files
committed
Fix black
1 parent e417f3c commit 0d1501c

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

gribapi/bindings.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
LOG.addHandler(logging.StreamHandler())
3939

4040

41-
def _find_eccodes_windows() -> str|None:
41+
def _find_eccodes_windows() -> str | None:
4242
# TODO delete once windows ceases to be supported
4343
name = "eccodes"
4444
env_var = "ECCODES_PYTHON_USE_FINDLIBS"
@@ -90,6 +90,7 @@ def _find_eccodes_windows() -> str|None:
9090
library_path = _find_eccodes_windows()
9191
if library_path is None:
9292
import findlibs
93+
9394
library_path = findlibs.find("eccodes")
9495
LOG.debug(f"eccodes lib search: findlibs returned {library_path}")
9596
if library_path is None:

setup.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
)
3939
]
4040

41+
4142
def get_version() -> str:
4243
version_pattern = (
4344
r"^__version__ = [\"\'](.*)[\"\']" # More permissive regex pattern
@@ -49,22 +50,25 @@ def get_version() -> str:
4950
raise ValueError("couldn't parse version")
5051
return version_match.group(1)
5152

53+
5254
def get_eccodeslib_dep() -> list[str]:
5355
eccodes_version = importlib.metadata.version("eccodeslib")
54-
mj, mn, pt = eccodes_version.split('.', 2)
56+
mj, mn, pt = eccodes_version.split(".", 2)
5557
return [
5658
f"eccodeslib >= {eccodes_version}, < {int(mj)+1}",
5759
]
5860

61+
5962
class bdist_wheel_ext(bdist_wheel):
6063
# cf wheelmaker setup.py for explanation
6164
def get_tag(self):
6265
python, abi, plat = bdist_wheel.get_tag(self)
6366
return python, abi, "manylinux_2_28_x86_64"
6467

68+
6569
ext_kwargs = {
66-
'darwin': {},
67-
'linux': {"cmdclass": {"bdist_wheel": bdist_wheel_ext}},
70+
"darwin": {},
71+
"linux": {"cmdclass": {"bdist_wheel": bdist_wheel_ext}},
6872
}
6973

7074
setuptools.setup(
@@ -77,5 +81,4 @@ def get_tag(self):
7781
keywords="ecCodes GRIB BUFR",
7882
ext_modules=ext_modules,
7983
**ext_kwargs[sys.platform],
80-
8184
)

0 commit comments

Comments
 (0)