-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
implement request_to_curl function #5892
implement request_to_curl function #5892
Conversation
Cool! |
Codecov Report
@@ Coverage Diff @@
## master #5892 +/- ##
==========================================
+ Coverage 88.82% 88.83% +0.01%
==========================================
Files 162 162
Lines 11108 11129 +21
Branches 1805 1811 +6
==========================================
+ Hits 9867 9887 +20
Misses 960 960
- Partials 281 282 +1
|
Can you please also look into pylint failures? |
@wRAR It's about using .format instead of f-strings. I think it's much cleaner to use format in this case instead of doing something like
but if it can't be merged as it is, I'll find a way around it sure. |
I think this warning should indeed be disabled, per-line or globally. I'll wait for other opinions though. |
I don’t think cookie = "; ".join(f"{k}={v}" for k, v in request.cookies.items())
cookies = f"--cookie '{cookie}'" No strong opinion, though. I am OK with disabling the check in these lines, but I would keep it globally so that f-strings are at least considered in cases like this one. |
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 think it would be ideal to cover this somewhere in the docs for discoverability, but at the same time I cannot find a good place in the existing docs for it, so +1 to merge as is.
Implement request_to_curl util function that generates a curl command string from a scrapy.Request object