Skip to content

Commit 08bf5f9

Browse files
[pre-commit.ci] pre-commit autoupdate (#614)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: 89c421dff2e1026ba12cdb9ebd731f4a83aa8021 → 971923581912ef60a6b70dbf0c3e9a39563c9d47](astral-sh/ruff-pre-commit@89c421d...9719235) * '[pre-commit.ci 🤖] Apply code format tools to PR' --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent fba6ee5 commit 08bf5f9

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

Diff for: .pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ repos:
2525
args: [--prose-wrap=preserve]
2626

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

Diff for: numpydoc/cli.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,11 @@ def _parse_config(s):
104104
nargs="*",
105105
help=(
106106
f"""Check codes to ignore.{
107-
' Currently ignoring the following from '
108-
f'{Path(project_root_from_cwd) / config_file}: {ignored_checks_text}'
109-
'Values provided here will be in addition to the above, unless an alternate config is provided.'
110-
if ignored_checks else ''
107+
" Currently ignoring the following from "
108+
f"{Path(project_root_from_cwd) / config_file}: {ignored_checks_text}"
109+
"Values provided here will be in addition to the above, unless an alternate config is provided."
110+
if ignored_checks
111+
else ""
111112
}"""
112113
),
113114
)

Diff for: numpydoc/docscrape.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,7 @@ def _parse_param_list(self, content, single_element_is_type=False):
232232
# NOTE: param line with single element should never have a
233233
# a " :" before the description line, so this should probably
234234
# warn.
235-
if header.endswith(" :"):
236-
header = header[:-2]
235+
header = header.removesuffix(" :")
237236
if single_element_is_type:
238237
arg_name, arg_type = "", header
239238
else:

Diff for: numpydoc/validate.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@
8080
"PR06": 'Parameter "{param_name}" type should use "{right_type}" instead '
8181
'of "{wrong_type}"',
8282
"PR07": 'Parameter "{param_name}" has no description',
83-
"PR08": 'Parameter "{param_name}" description should start with a '
84-
"capital letter",
83+
"PR08": 'Parameter "{param_name}" description should start with a capital letter',
8584
"PR09": 'Parameter "{param_name}" description should finish with "."',
8685
"PR10": 'Parameter "{param_name}" requires a space before the colon '
8786
"separating the parameter name and type",

0 commit comments

Comments
 (0)