Skip to content

Commit 050cf11

Browse files
Lukas Slebodniklslebodn
authored andcommitted
Remove unused "type: ignore" comments
1 parent c9b74d1 commit 050cf11

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

cloudpub/models/aws.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ class ListEntitiesResponse(AttrsJSONDecodeMixin):
940940
""" # noqa: E501
941941

942942
entity_summary_list: List[EntitySummary] = field(
943-
converter=lambda x: [EntitySummary.from_json(a) for a in x] if x else [], # type: ignore
943+
converter=lambda x: [EntitySummary.from_json(a) for a in x] if x else [],
944944
on_setattr=NO_OP,
945945
metadata={"alias": "EntitySummaryList"},
946946
)
@@ -995,7 +995,7 @@ class ChangeSummary(AttrsJSONDecodeMixin):
995995
"""This object contains details specific to the change type of the requested change."""
996996

997997
error_details: List[ErrorDetail] = field(
998-
converter=lambda x: [ErrorDetail.from_json(a) for a in x] if x else [], # type: ignore
998+
converter=lambda x: [ErrorDetail.from_json(a) for a in x] if x else [],
999999
on_setattr=NO_OP,
10001000
metadata={"alias": "ErrorDetailList"},
10011001
)
@@ -1066,7 +1066,7 @@ class DescribeChangeSetReponse(AttrsJSONDecodeMixin):
10661066
"""Returned if there is a failure on the change set, but that failure is not related to any of the changes in the request.""" # noqa: E501
10671067

10681068
change_set: List[ChangeSummary] = field(
1069-
converter=lambda x: [ChangeSummary.from_json(a) for a in x] if x else [], # type: ignore
1069+
converter=lambda x: [ChangeSummary.from_json(a) for a in x] if x else [],
10701070
on_setattr=NO_OP,
10711071
metadata={"alias": "ChangeSet"},
10721072
)
@@ -1148,7 +1148,7 @@ class ListChangeSetsResponse(AttrsJSONDecodeMixin):
11481148
"""The describe_entity response's metadata."""
11491149

11501150
change_set_list: List[ListChangeSet] = field(
1151-
converter=lambda x: [ListChangeSet.from_json(a) for a in x] if x else [], # type: ignore
1151+
converter=lambda x: [ListChangeSet.from_json(a) for a in x] if x else [],
11521152
on_setattr=NO_OP,
11531153
metadata={"alias": "ChangeSetSummaryList"},
11541154
)

cloudpub/models/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def from_json(cls, json: Any):
8282
json_copy = cls._preprocess_json(json_copy)
8383

8484
args = {}
85-
cls_attr = [a.name for a in cls.__attrs_attrs__ if isinstance(a, Attribute)] # type: ignore
85+
cls_attr = [a.name for a in cls.__attrs_attrs__ if isinstance(a, Attribute)]
8686
for a in cls_attr:
8787
args[a] = json_copy.pop(a, None)
8888

cloudpub/models/ms_azure.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ class PlanSummary(AzureProductLinkedResource):
662662

663663
gov_certifications: Optional[List[GovernmentCertification]] = field(
664664
metadata={"alias": "azureGovernmentCertifications", "hide_unset": True},
665-
converter=lambda x: [GovernmentCertification.from_json(a) for a in x] if x else None, # type: ignore # noqa: E501
665+
converter=lambda x: [GovernmentCertification.from_json(a) for a in x] if x else None,
666666
on_setattr=NO_OP,
667667
)
668668
"""Certifications for government plans."""
@@ -773,7 +773,7 @@ class VideoThumbnails(AttrsJSONDecodeMixin):
773773

774774
image_list: List[ThumbnailURL] = field(
775775
metadata={"alias": "imageList"},
776-
converter=lambda x: [ThumbnailURL.from_json(a) for a in x] if x else [], # type: ignore
776+
converter=lambda x: [ThumbnailURL.from_json(a) for a in x] if x else [],
777777
on_setattr=NO_OP,
778778
)
779779

@@ -1035,7 +1035,7 @@ class ProductReseller(AzureProductLinkedResource):
10351035
"""
10361036

10371037
audiences: List[Audience] = field(
1038-
converter=lambda x: [Audience.from_json(a) for a in x] if x else [], on_setattr=NO_OP # type: ignore # noqa: E501
1038+
converter=lambda x: [Audience.from_json(a) for a in x] if x else [], on_setattr=NO_OP
10391039
)
10401040
"""List of :class:`~cloudpub.models.ms_azure.Audience` for the reseller offer."""
10411041

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ commands =
4141
[testenv:mypy]
4242
basepython = python3.9
4343
deps = -r requirements-test.txt
44-
commands = mypy --ignore-missing-imports --exclude '^venv.*' .
44+
commands = mypy --warn-unused-ignores --ignore-missing-imports --exclude '^venv.*' .
4545

4646
[testenv:security]
4747
skip_install = true

0 commit comments

Comments
 (0)