Skip to content

ThatXliner/bs4-stubs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTE: I later found out this exists. But I don't know, maybe this has something typeshed doesn't. But I recommend typeshed's version over this experiment.

bs4-stubs

PEP 484 type hint stubs for BeautifulSoup originally generated with stubgen. This is mainly for people who use tools like MyPy.

Why

I use BeautifulSoup. I think it's beautiful 👌 ✨.

It's just that mypy gets crazy when I use it (complaining about Any). I created this because I couldn't find anything. Some guy wrote an article explaining BeautifulSoup types which I will use.

How to contribute

Please contibute! Mypy's stubgen is flawed and many type annotations needs fixing. The easiest way (as I can think of) is to

  • Run mypy strict bs4-stubs on this repo and fix the errors
  • Contribute to this repo when a type annotation needs fixing (e.g. object x needs proper type annotation because mypy is ruining my project)

Releases

No releases published

Packages

No packages published

Languages