Comment 6 for bug 1843791

Revision history for this message
Leonard Richardson (leonardr) wrote :

For anyone interested in trying it out, the 4.13 branch now contains pretty much all the type hints I'm going to add, given the current set of Python versions supported by Beautiful Soup.

I found some errors in the typeshed hints for html5lib and will be submitting a PR. My guess is no one noticed these errors because Beautiful Soup is the only consumer of those lower-level html5lib APIs that also uses type hints.

There are doubtless inconsistencies in the typeshed hints for beautifulsoup4 and the hints that I've added myself. I used the typeshed hints as an initial guide, but the final work is entirely my own. Hopefully the inconsistencies will be because my hints are more complete, but I haven't actually used Python type hints for anything except finding bugs through type-checking. So I don't know what effect this will have on people who *currently* rely on the typeshed hints.