Eric-Canas / QReader

Robust and Straight-Forward solution for reading difficult and tricky QR codes within images in Python. Powered by YOLOv8
MIT License
187 stars 23 forks source link

Missing py.typed file #38

Open oliverdain opened 2 months ago

oliverdain commented 2 months ago

From a quick look at your source code it looks like the library is thoroughly type hinted. However, mypy complains:

error: Skipping analyzing "qreader": module is installed, but missing library stubs or py.typed marker  [import]
note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports

I think simply including a py.typed file in your project will allow mypy to pay attention to the type hints in your source code.

Eric-Canas commented 2 months ago

@jandom

I'm not familiar with the changes you did with typing and mypy. Do you know something about that py.typed?

oliverdain commented 2 months ago

It's just a marker file that says your code contains type hints. More info here: https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-library-stubs-or-py-typed-marker

jandom commented 1 month ago

hey @Eric-Canas sorry was busy the last week, will take a look now!

jandom commented 1 month ago

Thanks @oliverdain I've added a PR with this fix – good catch!

https://github.com/Eric-Canas/QReader/pull/40

jandom commented 1 month ago

One small follow-up PR and I think we can close this one https://github.com/Eric-Canas/QReader/pull/41

jandom commented 1 month ago

@Eric-Canas should we close?

oliverdain commented 1 month ago

It'd be great if you could push a new release to PyPi before closing.

Thanks!!

Eric-Canas commented 1 month ago

Hi! Yes!

I have to test it out and get a bit familiar with the new implementation @jandom before uploading to PiPy. As the current PiPy version is previous to your heavy (and amazing ^~^) refactor, and I want to make 100% sure there there are not any unadvertised breaking changes that could affect current projects.

So that's fine, I'll try to get some time to deeply test it and make sure about that and I'll upload it to PiPy

jandom commented 1 month ago

That makes perfect sense - yeah, those PRs touched a lot of stuff. Hopefully, going forward we can reinforce with many tests to confirm the behavior is unchanged