Closed Forceres closed 1 month ago
yeah BindableLogger should probably return Self
everywhere. It seems like the Protocol was added in 2020 which predates Self
– at least in Python which grew it in 3.11.
I guess this means a conditional dependency on typing-extensions.
yeah BindableLogger should probably return
Self
everywhere. It seems like the Protocol was added in 2020 which predatesSelf
– at least in Python which grew it in 3.11.I guess this means a conditional dependency on typing-extensions.
I use Self, but IDE complains on bind method
yeah BindableLogger should probably return
Self
everywhere. It seems like the Protocol was added in 2020 which predatesSelf
– at least in Python which grew it in 3.11. I guess this means a conditional dependency on typing-extensions.I use Self, but IDE complains on bind method
I don't understand this response as a reply to what I wrote, or why you closed the issue, but there's now #642 now open to fix this.
yeah BindableLogger should probably return
Self
everywhere. It seems like the Protocol was added in 2020 which predatesSelf
– at least in Python which grew it in 3.11. I guess this means a conditional dependency on typing-extensions.I use Self, but IDE complains on bind method
I don't understand this response as a reply to what I wrote, or why you closed the issue, but there's now #642 now open to fix this.
It was misunderstanding between us, I meant that I used Self as a type hint and it should be ok for any type checkers, but from the first your reply I didn't get that it was a problem on structlog side. I temporarily ended with implementing extra protocol for no type warnings
Is here a way to implement bind method in protocol without static analyzer complains?
runtime_checkable works fine, and is_instance method too, but IDE points at incorrect type