checkov icon indicating copy to clipboard operation
checkov copied to clipboard

Removing dict[BlockTypeAlias, BicepElements] type error

Open luca-digrazia opened this issue 2 years ago • 2 comments

"filename": "checkov/bicep/graph_builder/graph_to_tf_definitions.py" "warning_type": "Incompatible variable type [9]" "warning_message": " BLOCK_TYPE_TO_BICEP_ELEMENTS_MAP is declared to have type typing.Dict[typing.Union[typing_extensions.Literal['module'], typing_extensions.Literal['output'], typing_extensions.Literal['param'], typing_extensions.Literal['resource'], typing_extensions.Literal['targetScope'], typing_extensions.Literal['var']], BicepElements] but is used as type typing.Dict[str, BicepElements]." "warning_line": 15 "fix": Removing dict[BlockTypeAlias, BicepElements]

luca-digrazia avatar Aug 10 '22 09:08 luca-digrazia

hi @luca-digrazia thanks for opening the PR, but where do you get the error from? If it is some kind of type checker, then we use internally mypy, which can correctly handle this.

gruebel avatar Aug 10 '22 12:08 gruebel

Hi, thanks for the reply. Yes, it is a Pyre warning and a fix for it.

luca-digrazia avatar Aug 10 '22 12:08 luca-digrazia