You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def visit_FunctionDef(self, node: FunctionDef) -> None:
"""Remove and map function arguments and returns."""
if self._function_is_wrapped_by_validate_arguments(node):
for path in [node.args.args, node.args.kwonlyargs, node.args.posonlyargs]:
for argument in path:
if hasattr(argument, 'annotation') and argument.annotation:
self.visit(argument.annotation)
def visit_AsyncFunctionDef(self, node: AsyncFunctionDef) -> None:
"""Remove and map function arguments and returns."""
if self._function_is_wrapped_by_validate_arguments(node):
for path in [node.args.args, node.args.kwonlyargs, node.args.posonlyargs]:
for argument in path:
if hasattr(argument, 'annotation') and argument.annotation:
self.visit(argument.annotation)
At the moment, plugin code is organized in the way, where main logic is keep the same, but additional logic can be added using decomposition with Mixins.
The behaviour supposed to have chain of super calls in each of Mixin class, to apply each of visit function, if required by option.
At the moment, PydanticMixin implemented without super call, which leads to heavy dependence on MRO for future mixins.
For my opinion, it should be resolved by adding super call to Pydantic Mixin (quick solution), or changing the decomposition pattern.
The text was updated successfully, but these errors were encountered:
https://github.com/snok/flake8-type-checking/blob/7aa077e3a34d966c3810c2d2ee6f5b098dcb2e00/flake8_type_checking/checker.py#L201C2-L201C2
At the moment, plugin code is organized in the way, where main logic is keep the same, but additional logic can be added using decomposition with Mixins.
The behaviour supposed to have chain of
super
calls in each of Mixin class, to apply each of visit function, if required by option.At the moment, PydanticMixin implemented without super call, which leads to heavy dependence on MRO for future mixins.
For my opinion, it should be resolved by adding
super
call to Pydantic Mixin (quick solution), or changing the decomposition pattern.The text was updated successfully, but these errors were encountered: