Skip to content

Commit a0834e9

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 1591758 commit a0834e9

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

ci/min_deps_check.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import sys
1212
from collections.abc import Iterator
1313
from datetime import datetime
14-
from typing import Optional
1514

1615
import conda.api # type: ignore[import]
1716
import yaml
@@ -58,7 +57,7 @@ def warning(msg: str) -> None:
5857
print("WARNING:", msg)
5958

6059

61-
def parse_requirements(fname) -> Iterator[tuple[str, int, int, Optional[int]]]:
60+
def parse_requirements(fname) -> Iterator[tuple[str, int, int, int | None]]:
6261
"""Load requirements/py*-min-all-deps.yml
6362
6463
Yield (package name, major version, minor version, [patch version])
@@ -129,7 +128,7 @@ def metadata(entry):
129128

130129

131130
def process_pkg(
132-
pkg: str, req_major: int, req_minor: int, req_patch: Optional[int]
131+
pkg: str, req_major: int, req_minor: int, req_patch: int | None
133132
) -> tuple[str, str, str, str, str, str]:
134133
"""Compare package version from requirements file to available versions in conda.
135134
Return row to build pandas dataframe:

mplotutils/_cartopy_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ def yticklabels(
327327
if not y_label_points:
328328
msg = (
329329
"WARN: no points found for ylabel\n"
330-
"y_lim is: {:0.2f} to {:0.2f}".format(y_lim[0], y_lim[1])
330+
f"y_lim is: {y_lim[0]:0.2f} to {y_lim[1]:0.2f}"
331331
)
332332
warnings.warn(msg)
333333

@@ -427,7 +427,7 @@ def xticklabels(
427427
if not x_label_points:
428428
msg = (
429429
"WARN: no points found for xlabel\n"
430-
"x_lim is: {:0.2f} to {:0.2f}".format(x_lim[0], x_lim[1])
430+
f"x_lim is: {x_lim[0]:0.2f} to {x_lim[1]:0.2f}"
431431
)
432432
warnings.warn(msg)
433433

0 commit comments

Comments
 (0)