Open macieyng opened 1 year ago
mypy is complaining that error: Argument 1 to "before_log" has incompatible type "LoggerAdapter[Logger]"; expected "Logger" [arg-type]
error: Argument 1 to "before_log" has incompatible type "LoggerAdapter[Logger]"; expected "Logger" [arg-type]
by looking at the implementation
def before_log(logger: "logging.Logger", log_level: int) -> typing.Callable[["RetryCallState"], None]:
Looks like we need to create some type that implements logger interface and check against that rather than against arbitrary types or simply allow logger adapter.
I'm willing to work on this issue. lmk wdyt.
Do you have anything for this ready? / Do you intend to still work on this?
I just wanted to express my readiness to work on this, but I was waiting for maintainers to approve or discuss the idea.
Description
mypy is complaining that
error: Argument 1 to "before_log" has incompatible type "LoggerAdapter[Logger]"; expected "Logger" [arg-type]
by looking at the implementation
Looks like we need to create some type that implements logger interface and check against that rather than against arbitrary types or simply allow logger adapter.
I'm willing to work on this issue. lmk wdyt.