Skip to content

Commit 782522a

Browse files
authored
Merge branch 'main' into fix/future_sphinx
2 parents 8453733 + b0d24c0 commit 782522a

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
6+
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
77
hooks:
88
- id: check-added-large-files
99
- id: check-ast
@@ -25,7 +25,7 @@ repos:
2525
args: [--prose-wrap=preserve]
2626

2727
- repo: https://github.com/astral-sh/ruff-pre-commit
28-
rev: "9c89adb347f6b973f4905a4be0051eb2ecf85dea" # frozen: v0.13.3
28+
rev: "9c89adb347f6b973f4905a4be0051eb2ecf85dea" # frozen: v0.13.3
2929
hooks:
3030
- id: ruff
3131
args: ["--fix", "--show-fixes", "--exit-non-zero-on-fix"]

numpydoc/docscrape.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ def get_func(self):
597597
def __str__(self):
598598
out = ""
599599

600-
func, func_name = self.get_func()
600+
_func, func_name = self.get_func()
601601

602602
roles = {"func": "function", "meth": "method"}
603603

numpydoc/tests/test_docscrape.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def test_parameters(doc):
211211
def test_other_parameters(doc):
212212
assert len(doc["Other Parameters"]) == 1
213213
assert [n for n, _, _ in doc["Other Parameters"]] == ["spam"]
214-
arg, arg_type, desc = doc["Other Parameters"][0]
214+
_arg, arg_type, desc = doc["Other Parameters"][0]
215215
assert arg_type == "parrot"
216216
assert desc[0].startswith("A parrot off its mortal coil")
217217

numpydoc/tests/test_validate.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,11 +1391,8 @@ def test_bad_class(self, capsys):
13911391
],
13921392
)
13931393
def test_bad_generic_functions(self, capsys, func):
1394-
with pytest.warns(UserWarning):
1395-
errors = validate_one(
1396-
self._import_path(klass="WarnGenericFormat", func=func)
1397-
)
1398-
assert "is too short" in w.msg
1394+
with pytest.warns(UserWarning, match="is too short"):
1395+
validate_one(self._import_path(klass="WarnGenericFormat", func=func))
13991396

14001397
@pytest.mark.parametrize(
14011398
"func",

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ extend-select = [
9999
ignore = [
100100
"PLR09", # Too many <...>
101101
"PLR2004", # Magic value used in comparison
102+
"PLC0415", # Imports not at top of file (we often nest intentionally)
102103
"ISC001", # Conflicts with formatter
103104
"ARG001", # FIXME: consider removing this and the following rules from this list
104105
"ARG002",

0 commit comments

Comments
 (0)