-
Notifications
You must be signed in to change notification settings - Fork 61
CSS immediate children (:scope selector) #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Testing, adding custom tests. |
Codecov Report
@@ Coverage Diff @@
## master #87 +/- ##
==========================================
- Coverage 95.25% 95.14% -0.11%
==========================================
Files 2 2
Lines 695 700 +5
Branches 113 115 +2
==========================================
+ Hits 662 666 +4
Misses 19 19
- Partials 14 15 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside of some nitpicks I think it is a good addition as it is. thanks
@sortafreel Great job, Alexander! One thought though. The Selectors Level 4 defines the
Could we use it instead of |
:scope
selector)
:scope
selector)ed529ae
to
5a794fa
Compare
8f08371
to
ce928d2
Compare
ce928d2
to
270f118
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love these changes! The only thing I think is missing is to update https://cssselect.readthedocs.io/en/latest/#supported-selectors to mention :scope
.
@Gallaecio Done :) |
@sortafreel seems we are very close, only rest covering the case codecov is complaining with a test. |
@dangra The tests cover all changes as far as @sortafreel and me can tell. @sortafreel tried different changes to see if they had any effect on codecov, but neither @sortafreel nor me managed to find a new path of code that is not hit by at least one test. |
I believe we are being hit by https://bugs.python.org/issue2506 If I do what https://bitbucket.org/ned/coveragepy/issues/594/problems-with-branch-identification-and#comment-38845397 suggests:
Then the coverage data from |
@Gallaecio thanks for the support :) |
Nice catch @Gallaecio ! all good then. |
@sortafreel thanks for all the good work |
CSS immediate children pseudo-element (from CSS
:scope > div
to XPathchild::div
or./div
). Works only at the start of a selector. https://developer.mozilla.org/en-US/docs/Web/CSS/:scopeNeeded to get immediate children of a processed selector in Scrapy:
HTML example: