Skip to content

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

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ repos:
- id: taplo-format

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.9
rev: v0.12.0
hooks:
- id: ruff
args: [--fix]
- id: ruff-format

- repo: https://github.com/google/yamlfmt
rev: v0.16.0
rev: v0.17.1
hooks:
- id: yamlfmt

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.15.0
rev: v1.16.1
hooks:
- id: mypy
files: sphinx_needs/.*
Expand Down
2 changes: 1 addition & 1 deletion sphinx_needs/functions/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def resolve_variants_options(
**needs_config.filter_data
) # Add needs_filter_data to filter context
need_context.update(
**{tag: True for tag in tags}
**dict.fromkeys(tags, True)
) # Add sphinx tags to filter context
location = (need["docname"], need["lineno"]) if need.get("docname") else None

Expand Down
3 changes: 1 addition & 2 deletions sphinx_needs/needsfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ def generate_needs_schema(
}

for name in exclude_properties:
if name in properties:
del properties[name]
properties.pop(name, None)

return {
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
2 changes: 1 addition & 1 deletion sphinx_needs/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def _copy_filtered(
) -> NeedsAndPartsListView:
"""Create a new view with only the needs/parts with the given ids."""
if self._selected_ids is None:
selected_ids = {n: None for n in ids}
selected_ids = dict.fromkeys(ids)
else:
selected_ids = {n: None for n in ids if n in self._selected_ids}
return NeedsAndPartsListView(_indexes=self._indexes, _selected_ids=selected_ids)
Expand Down
Loading