scrapy / parsel

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

Full typing #265

Closed wRAR closed 1 year ago

wRAR commented 1 year ago

This makes mypy --strict work. I don't intend to merge it before the release.

codecov[bot] commented 1 year ago

Codecov Report

Merging #265 (c597146) into master (1942f6d) will decrease coverage by 9.10%. The diff coverage is 73.46%.

@@             Coverage Diff             @@
##            master     #265      +/-   ##
===========================================
- Coverage   100.00%   90.90%   -9.10%     
===========================================
  Files            4        5       +1     
  Lines          138      407     +269     
  Branches        29       81      +52     
===========================================
+ Hits           138      370     +232     
- Misses           0       30      +30     
- Partials         0        7       +7     
Impacted Files Coverage Δ
parsel/csstranslator.py 86.07% <63.33%> (-13.93%) :arrow_down:
parsel/selector.py 89.84% <81.81%> (ø)
parsel/utils.py 100.00% <100.00%> (ø)
parsel/xpathfuncs.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

wRAR commented 1 year ago

Both bugs I filed for types-lxml are fixed so when it has a new release we can pin it and drop our workarounds (in this PR if it's not merged before that).

wRAR commented 1 year ago

typing.Self support is merged in mypy but not released yet, so it makes sense to wait until it is.

wRAR commented 1 year ago

(checked with unreleased mypy)