-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
Code sharing between crawl and runspider command #4552
Conversation
Instead of creating a new file, what about using |
There is actually same function i.e In case we add the code to the |
Codecov Report
@@ Coverage Diff @@
## master #4552 +/- ##
==========================================
+ Coverage 84.55% 84.74% +0.19%
==========================================
Files 164 164
Lines 9923 10011 +88
Branches 1475 1513 +38
==========================================
+ Hits 8390 8484 +94
+ Misses 1266 1263 -3
+ Partials 267 264 -3
|
I’m not sure what you mean by “the options will be displayed for each file”. Those two objects are methods of a class, not module-level functions. If you rename your new |
Alright! I sort of had a confusion. I will move the entire class to |
@Gallaecio codecov for the patch is failing. Can you please guide me as to how I can fix it. Also please let me know if anything else needs to be rectified in the previous commit. |
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.
Style comments.
Feel free to ignore codecov in this case. You are modifying lines that are not covered by unit tests, so obviously your changes include lines not covered by unit tests, but given how straightforward these changes are, I don’t think we should consider test coverage part of the scope of these changes. |
@Gallaecio is there anything else that needs to be done here? |
Co-authored-by: Adrián Chaves <adrian@chaves.io>
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.
Many thanks @jay24rajput! I left a suggestion to simplify a docstring, but it's not a blocker.
Changed typo in a comment for BaseRunSpiderCommand Co-authored-by: Eugenio Lacuesta <1731933+elacuesta@users.noreply.github.com>
@elacuesta @Gallaecio the checks haven't completed yet! Any solutions? |
Hi @jay24rajput it is working, the error is not related to the code but to connection errors. However, if you want to relaunch the check you can close and open again this PR. |
Implemented a new file common_commands for reusing the
add_options
andprocess_option
command previously used incrawl.py
andrunspider.py
Fixes #4548