Skip to content

Commit

Permalink
Fix issues identified by sonar, fix changelog formatting, revert chan…
Browse files Browse the repository at this point in the history
…ge in workflow (#651)
  • Loading branch information
mauvilsa authored Dec 23, 2024
1 parent c5fbd11 commit c934d25
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
with:
python-version: ${{ matrix.python }}
cache: pip
- run: pip install --disable-pip-version-check tox
- run: pip install tox
- run: tox -e py-all-extras

omegaconf:
Expand Down
6 changes: 3 additions & 3 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ Fixed
^^^^^
- Help for ``Protocol`` types not working correctly (`#645
<https://github.com/omni-us/jsonargparse/pull/645>`__).
- Adding ``attrs.define`` dataclasses with nested dataclasses that are marked with
``attrs.field`` (such as for a default factory) are not parsed correctly (`#643
<https://github.com/omni-us/jsonargparse/pull/643>`__)
- Adding ``attrs.define`` dataclasses with nested dataclasses that are marked
with ``attrs.field`` (such as for a default factory) are not parsed correctly
(`#643 <https://github.com/omni-us/jsonargparse/pull/643>`__).
- Nested dataclass with ``init=False`` not working correctly (`#650
<https://github.com/omni-us/jsonargparse/pull/650>`__).

Expand Down
2 changes: 1 addition & 1 deletion jsonargparse/_parameter_resolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def is_param_subclass_instance_default(param: ParamData) -> bool:


def split_args_and_kwargs(params: ParamList) -> Tuple[ParamList, ParamList]:
args = [p for p in params if p.kind is kinds.POSITIONAL_ONLY]
args = [p for p in params if p.kind == kinds.POSITIONAL_ONLY]
kwargs = [p for p in params if p.kind in {kinds.KEYWORD_ONLY, kinds.POSITIONAL_OR_KEYWORD}]
return args, kwargs

Expand Down
4 changes: 2 additions & 2 deletions jsonargparse/_signatures.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def add_class_arguments(
raise ValueError(
f"Expected 'default' to be dict, Namespace, lazy instance or dataclass-like, got: {default}"
)
linked_targets, help, _ = get_private_kwargs(
linked_targets, help_, _ = get_private_kwargs(
kwargs,
linked_targets=None,
help=None,
Expand All @@ -111,7 +111,7 @@ def add_class_arguments(
sub_configs=sub_configs,
instantiate=instantiate,
linked_targets=linked_targets,
help=help,
help=help_,
)

if default:
Expand Down

0 comments on commit c934d25

Please sign in to comment.