porcupine/plugins/langserver.py:789: error: Argument 1 to "addFilter" of "Filterer" has incompatible type "HackFilter"; expected "Union[Filter, Callable[[LogRecord], int]]"
HackFilter is a class that has a filter() method but doesn't inherit from anything. This should work, according to docs: "You don’t actually need to subclass Filter: you can pass any instance which has a filter method with the same semantics." https://docs.python.org/3/library/logging.html
Callable[[LogRecord], int] seems wrong. The imlpementation basically does self.filters.append(filter). Does it really handle callables and objects with a .filter() method everywhere where it uses self.filters?
HackFilteris a class that has afilter()method but doesn't inherit from anything. This should work, according to docs: "You don’t actually need to subclass Filter: you can pass any instance which has a filter method with the same semantics." https://docs.python.org/3/library/logging.htmlCallable[[LogRecord], int]seems wrong. The imlpementation basically doesself.filters.append(filter). Does it really handle callables and objects with a.filter()method everywhere where it usesself.filters?