Skip to content

Commit 5e0b299

Browse files
committed
lint fix
1 parent 58b88fc commit 5e0b299

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

sdk/batch/azure-batch/azure/batch/_model_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -821,16 +821,16 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-retur
821821

822822
# is it optional?
823823
try:
824-
if any(a for a in annotation.__args__ if a == type(None)): # pyright: ignore
824+
if any(a for a in annotation.__args__ if a == type(None)): # pyright: ignore # pylint: disable=unidiomatic-typecheck
825825
if len(annotation.__args__) <= 2: # pyright: ignore
826826
if_obj_deserializer = _get_deserialize_callable_from_annotation(
827-
next(a for a in annotation.__args__ if a != type(None)), module, rf # pyright: ignore
827+
next(a for a in annotation.__args__ if a != type(None)), module, rf # pyright: ignore # pylint: disable=unidiomatic-typecheck
828828
)
829829

830830
return functools.partial(_deserialize_with_optional, if_obj_deserializer)
831831
# the type is Optional[Union[...]], we need to remove the None type from the Union
832832
annotation_copy = copy.copy(annotation)
833-
annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a != type(None)] # pyright: ignore
833+
annotation_copy.__args__ = [a for a in annotation_copy.__args__ if a != type(None)] # pyright: ignore # pylint: disable=unidiomatic-typecheck
834834
return _get_deserialize_callable_from_annotation(annotation_copy, module, rf)
835835
except AttributeError:
836836
pass

0 commit comments

Comments
 (0)