diff --git a/tuf/api/metadata.py b/tuf/api/metadata.py index 716b585479..21603d9cc3 100644 --- a/tuf/api/metadata.py +++ b/tuf/api/metadata.py @@ -289,8 +289,11 @@ def from_dict(cls, signed_dict: JsonDict) -> 'Signed': # Create empty object with default or parametrized constructor with # default arguments. - obj = cls() - obj._type = signed_dict['_type'] + # Warnings about rules E1120 and W0212 are not relevant here because + # cls is most likely a child class of "Signed" and we need to setup + # the appropriate fields. + obj = cls() # pylint: disable=E1120 + obj._type = signed_dict['_type'] # pylint: disable=W0212 obj.version = signed_dict['version'] obj.spec_version = signed_dict['spec_version'] # Convert 'expires' TUF metadata string to a datetime object, which is diff --git a/tuf/api/pylintrc b/tuf/api/pylintrc index a75347f446..afba2a2c32 100644 --- a/tuf/api/pylintrc +++ b/tuf/api/pylintrc @@ -1,5 +1,5 @@ [MESSAGE_CONTROL] -disable=fixme +disable=fixme,E1101 [FORMAT] indent-string=" "