oprypin / mkdocs-gen-files

MkDocs plugin to programmatically generate documentation pages during the build
https://oprypin.github.io/mkdocs-gen-files
MIT License
98 stars 8 forks source link

Add `-> None` to `Nav.__init__()` #19

Closed peterschutt closed 1 year ago

peterschutt commented 1 year ago

Hi, thanks for this really useful library!

I get an error from mypy when using Nav:

docs/gen_ref_pages.py:10: error: Call to untyped function "Nav" in typed context [no-untyped-call]

It is due to the fact that an __init__() method with no args and no return type is considered untyped.

Would you accept a PR adding -> None: for the method.

Cheers!

oprypin commented 1 year ago

OK. But this seems like a totally unreasonable lint check. It just shouldn't be used and shouldn't be a thing. Just stick to no-untyped-def if you want to be pedantic with your own code

peterschutt commented 1 year ago

I already have a # type:ignore[...] there for it. I don't want to make a change that you don't support.