dgunning / edgartools

Python library for working with SEC Edgar
MIT License
324 stars 70 forks source link

chore: update types in _filings.py #41

Closed jekozyra closed 2 months ago

jekozyra commented 2 months ago

This PR adds pyright as a development dependency so that static typechecking can be run via hatch run pyright. The pyrightconfig.json is pointed only at the edgar/ directory.

I also fixed the type errors that I found in _filings.py, which were the original motivation for making this change.

Before:

jillian-poggio:edgartools jilliankozyra$ hatch run pyright edgar/
...
1029 errors, 4 warnings, 0 informations

After:

jillian-poggio:edgartools jilliankozyra$ hatch run pyright edgar/
...
764 errors, 4 warnings, 0 informations

I'm happy to keep chipping away at other parts of the repo (probably documents.py next).

dgunning commented 2 months ago

Awesome, this is much needed and appreciated. I am reviewing this PR and will see if it can go into the next release.

Thanks