madzak / python-json-logger

Json Formatter for the standard python logger
BSD 2-Clause "Simplified" License
1.74k stars 231 forks source link

fix(JsonFormatter): type the constructor #170

Closed erdnaxeli closed 1 year ago

erdnaxeli commented 1 year ago

Now that the package include py.typed, mypy actually checks the type. I am using disallow-untyped-calls, so it fails because the constructor of JsonFormatter is untyped. This PR fixes it.

I run tox which runs black, which fixed some formatting issues.

jenstroeger commented 1 year ago

As an aside, typing really makes this code look ugly as hell :(

Heheh, but it’s worthwhile to catch bugs. But anyway, do you know when this will roll out into a new release?

erdnaxeli commented 1 year ago

Hi, could you consider making a new release? Currently all our apps have a version constraint <2.7 on this lib in order to mypy to pass.

OmerFI commented 11 months ago

Hi @madzak could you publish a release with this change included?