scrapy / parsel

Parsel lets you extract data from XML/HTML documents using XPath or CSS selectors
BSD 3-Clause "New" or "Revised" License
1.15k stars 146 forks source link

Improve typing in parsel.selector._ctgroup #264

Closed wRAR closed 1 year ago

wRAR commented 2 years ago

parsel.selector._ctgroup, used to switch between mode implementations, is an untyped dict of dicts, it makes sense to change it into something cleaner as it's a private var.

wRAR commented 2 years ago

TypedDict could be used, though maybe it's easier to just use a normal dataclass or something similar (especially as TypedDict doesn't exist in 3.7).

wRAR commented 1 year ago

Implemented in #181.