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
mypy runs perfectly on terminal, but when running on pre-commit stage, I am getting the error Unexpected keyword argument for every property in my class
from attrs import define, field
@define(
frozen=True,
kw_only=True,
slots=True,
auto_detect=True,
order=False,
auto_attribs=True,
)
class MyClass:
a: str = field(default="")
b: str = field(default="")
def myMethod(self) -> Any:
return MyClass(a=self.a, b="b_value")
mypy pre-commit failed:
error: Unexpected keyword argument "a" for MyClass (line: return MyClass...)
error: Unexpected keyword argument "b" for MyClass (line: return MyClass...)
mypy runs perfectly on terminal, but when running on pre-commit stage, I am getting the error Unexpected keyword argument for every property in my class
mypy pre-commit failed:
error: Unexpected keyword argument "a" for MyClass (line: return MyClass...)
error: Unexpected keyword argument "b" for MyClass (line: return MyClass...)
.pre-commit-config.yaml:
The text was updated successfully, but these errors were encountered: