Skip to content

[pre-commit.ci] pre-commit autoupdate #614

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ repos:
args: [--prose-wrap=preserve]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "89c421dff2e1026ba12cdb9ebd731f4a83aa8021" # frozen: v0.8.6
rev: "971923581912ef60a6b70dbf0c3e9a39563c9d47" # frozen: v0.11.4
hooks:
- id: ruff
args: ["--fix", "--show-fixes", "--exit-non-zero-on-fix"]
Expand Down
9 changes: 5 additions & 4 deletions numpydoc/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,11 @@ def _parse_config(s):
nargs="*",
help=(
f"""Check codes to ignore.{
' Currently ignoring the following from '
f'{Path(project_root_from_cwd) / config_file}: {ignored_checks_text}'
'Values provided here will be in addition to the above, unless an alternate config is provided.'
if ignored_checks else ''
" Currently ignoring the following from "
f"{Path(project_root_from_cwd) / config_file}: {ignored_checks_text}"
"Values provided here will be in addition to the above, unless an alternate config is provided."
if ignored_checks
else ""
}"""
),
)
Expand Down
3 changes: 1 addition & 2 deletions numpydoc/docscrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,7 @@ def _parse_param_list(self, content, single_element_is_type=False):
# NOTE: param line with single element should never have a
# a " :" before the description line, so this should probably
# warn.
if header.endswith(" :"):
header = header[:-2]
header = header.removesuffix(" :")
if single_element_is_type:
arg_name, arg_type = "", header
else:
Expand Down
3 changes: 1 addition & 2 deletions numpydoc/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@
"PR06": 'Parameter "{param_name}" type should use "{right_type}" instead '
'of "{wrong_type}"',
"PR07": 'Parameter "{param_name}" has no description',
"PR08": 'Parameter "{param_name}" description should start with a '
"capital letter",
"PR08": 'Parameter "{param_name}" description should start with a capital letter',
"PR09": 'Parameter "{param_name}" description should finish with "."',
"PR10": 'Parameter "{param_name}" requires a space before the colon '
"separating the parameter name and type",
Expand Down
Loading