Skip to content

Commit

Permalink
Satisfy SONAR.
Browse files Browse the repository at this point in the history
  • Loading branch information
zuckerruebe committed Oct 21, 2024
1 parent dcca527 commit 3a194a1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions trnsysGUI/serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ class RequiredDecoderFieldsMixin:

class HandleBlockOrConnectionDictMixinBase(_abc.ABC):
@classmethod
def from_dict( # pylint: disable=invalid-name
def from_dict( # /NOSONAR # pylint: disable=invalid-name
cls,
data: _dcj.JsonDict,
validate=True,
validate_enums: bool = True,
schema_type: _dcj.SchemaType = _dcj.DEFAULT_SCHEMA_TYPE, # /NOSONAR
validate_enums: bool = True, # /NOSONAR # pylint: disable=invalid-name
schema_type: _dcj.SchemaType = _dcj.DEFAULT_SCHEMA_TYPE, # /NOSONAR # pylint: disable=invalid-name
):
if not cls.key() in data:
raise ValueError(f"Not a `{cls.key()}`.", data)
Expand All @@ -29,12 +29,12 @@ def from_dict( # pylint: disable=invalid-name

return super().from_dict(data, validate, validate_enums, schema_type) # type: ignore[misc]

def to_dict( # pylint: disable=invalid-name
def to_dict( # /NOSONAR # pylint: disable=invalid-name
self,
omit_none: bool = True,
validate: bool = False,
validate_enums: bool = True,
schema_type: _dcj.SchemaType = _dcj.DEFAULT_SCHEMA_TYPE, # /NOSONAR
omit_none: bool = True, # /NOSONAR # pylint: disable=invalid-name
validate: bool = False, # /NOSONAR # pylint: disable=invalid-name
validate_enums: bool = True, # /NOSONAR # pylint: disable=invalid-name
schema_type: _dcj.SchemaType = _dcj.DEFAULT_SCHEMA_TYPE, # /NOSONAR # pylint: disable=invalid-name
) -> _dcj.JsonDict:
data = super().to_dict(omit_none, validate, validate_enums, schema_type) # type: ignore[misc]

Expand Down

0 comments on commit 3a194a1

Please sign in to comment.