Closed meshy closed 9 months ago
Have you considered creating a stub file pytest_structlog.pyi
?
That didn't occur to me. Good idea, thank you!
So, making the stub file will work, but I wouldn't have thought this is actually closed? Would you be interested in a PR fixing this?
Okay, sure, with the caveat that the PR must also add a pyright or mypy run into the CI (i.e. in .github/workflows). I will reopen the issue.
@wimglenn https://github.com/wimglenn/pytest-structlog/pull/27 does all that. Note that it doesn't work for 2.7 at all right now (but neither does the overall build), but wasn't sure of your thoughts on support there.
Hi! Firstly, thank you for this useful pytest plugin.
I'm writing some code that uses mypy to do some reasonably strict type checking, and I've noticed that I get this error when importing from
pytest_structlog
:I can work around this by adding a block to my
mypy.ini
file:Ideally however, it'd be nice if this project had type hinting. I notice that this project still has Python 2 in the TravisCI config, so it wouldn't be possible to use the Python 3 type annotations syntax, though there does appear to be mypy support for Python 2.
There's no important need for this, so no pressure! It's just a "nice to have" from my perspective :slightly_smiling_face: