Skip to content

Commit 7e80699

Browse files
committed
Satisfy linters
1 parent fec660d commit 7e80699

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/mdformat/_cli.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ def run(cli_args: Sequence[str]) -> int: # noqa: C901
5959
return 1
6060
opts: Mapping = {**DEFAULT_OPTS, **toml_opts, **cli_opts}
6161

62-
if sys.version_info >= (3, 13):
62+
if sys.version_info >= (3, 13): # pragma: no cover
6363
if is_excluded(path, opts["exclude"], toml_path, "exclude" in cli_opts):
6464
continue
65-
else:
65+
else: # pragma: no cover
6666
if "exclude" in toml_opts:
6767
print_error(
6868
"'exclude' patterns are only available on Python 3.13+.",
@@ -172,7 +172,7 @@ def make_arg_parser(
172172
choices=("lf", "crlf", "keep"),
173173
help="output file line ending mode (default: lf)",
174174
)
175-
if sys.version_info >= (3, 13):
175+
if sys.version_info >= (3, 13): # pragma: no cover
176176
parser.add_argument(
177177
"--exclude",
178178
action="append",
@@ -237,7 +237,10 @@ def is_excluded(
237237
except ValueError:
238238
return False
239239

240-
return any(relative_path.full_match(pattern) for pattern in patterns)
240+
return any(
241+
relative_path.full_match(pattern) # type: ignore[attr-defined]
242+
for pattern in patterns
243+
)
241244

242245

243246
def _normalize_path(path: Path) -> Path:

0 commit comments

Comments
 (0)