def _check_double_starred_dict( self, keywords: Sequence[ast.keyword], ) -> None: for keyword in keywords: if keyword.arg is None and self._is_pointless_star(keyword.value): self.add_violation(PointlessStarredViolation(keyword.value))
def _check_starred_args( self, args: Sequence[ast.AST], ) -> None: for node in args: if isinstance(node, ast.Starred): if self._is_pointless_star(node.value): self.add_violation(PointlessStarredViolation(node))
def _check_double_starred_dict( self, keywords: Sequence[ast.keyword], ) -> None: for keyword in keywords: if keyword.arg is not None: continue complex_keys = self._has_non_string_keys(keyword) pointless_args = self._is_pointless_star(keyword.value) if not complex_keys and pointless_args: self.add_violation(PointlessStarredViolation(keyword.value))