Skip to content

Commit 4144497

Browse files
[pre-commit.ci] pre-commit autoupdate (#2357)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.9.9 → v0.11.4](astral-sh/ruff-pre-commit@v0.9.9...v0.11.4) - [github.com/pycqa/flake8: 7.1.2 → 7.2.0](PyCQA/flake8@7.1.2...7.2.0) * ci(ruff): Don't use `os.listdir` https://docs.astral.sh/ruff/rules/os-listdir/ https://results.pre-commit.ci/run/github/760058710/1744049621.ZnMMLtJ3RhW-QkNN9c2Okw * oops use `Path.stem` https://results.pre-commit.ci/run/github/760058710/1744104597.idJZGk3HSbm5kqjUnMVunw --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: dangotbanned <[email protected]>
1 parent 93e606a commit 4144497

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ci:
44
repos:
55
- repo: https://github.com/astral-sh/ruff-pre-commit
66
# Ruff version.
7-
rev: 'v0.9.9'
7+
rev: 'v0.11.4'
88
hooks:
99
# Run the formatter.
1010
- id: ruff-format
@@ -22,7 +22,7 @@ repos:
2222
args: [--ignore-words-list=ser]
2323
exclude: ^docs/api-completeness.md$
2424
- repo: https://github.com/pycqa/flake8
25-
rev: '7.1.2' # todo: remove once https://github.com/astral-sh/ruff/issues/458 is addressed
25+
rev: '7.2.0' # todo: remove once https://github.com/astral-sh/ruff/issues/458 is addressed
2626
hooks:
2727
- id: flake8
2828
additional_dependencies: [darglint==1.8.1, Flake8-pyproject]

utils/check_api_reference.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
from __future__ import annotations
22

3-
import os
43
import sys
4+
from pathlib import Path
55

66
import polars as pl
77

88
import narwhals as nw
99
from narwhals._expression_parsing import ExprMetadata
1010
from narwhals.utils import remove_prefix
11-
from narwhals.utils import remove_suffix
1211

1312
ret = 0
1413

@@ -47,7 +46,7 @@
4746
"Mapping",
4847
}
4948

50-
files = {remove_suffix(i, ".py") for i in os.listdir("narwhals")}
49+
files = {fp.stem for fp in Path("narwhals").iterdir()}
5150

5251
# Top level functions
5352
top_level_functions = [

0 commit comments

Comments
 (0)