Closed hackrush01 closed 7 years ago
Can't understand how to pass the check. Tried coala in my pc still didn't work. but it passes pytest.
hackrush_st@hackrush:~/git-repos/UIP$ pytest
================================================================ test session starts =================================================================
platform linux -- Python 3.5.2+, pytest-3.0.4, py-1.4.31, pluggy-0.4.0
rootdir: /home/hackrush_st/git-repos/UIP, inifile:
collected 5 items
tests/test_scrape.py ....
tests/test_utils.py .
============================================================== 5 passed in 1.25 seconds ==============================================================
hackrush_st@hackrush:~/git-repos/UIP$
@hackrush01 pytest
is the command for tests to run, coala
is the command for coala
So what do I do? I ran coala but it still didn't help. Why am I failing the travis-ci?
Edit: Can we set a greater limit for number of characters in a line?
@hackrush01 no, 80 is PEP8 standard and we are PEP8 compliant. Since at below 80 the code is more readable.
So how do I correct my code?
@hackrush01 if its just the line length thats causing the error just split the code into multiple lines?
Then also it doesn't get corrected, I tried that with my earlier commit.
-Regards -Amit Tulshyan
On 14-Dec-2016 3:02 pm, "Abhay Raizada" notifications@github.com wrote:
In uiplib/scrape/scrape.py https://github.com/NIT-dgp/UIP/pull/239:
@@ -10,7 +10,7 @@ def make_soup(url): ''' makes soup, that is basically parsing the html document '''
- response = requests.get(url, headers={'User-agent': 'UIP'})
- response = requests.get(url, headers={'User-agent': 'UIP'}, proxies=getproxies())
if you're experiencing line-length difficulties
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NIT-dgp/UIP/pull/239, or mute the thread https://github.com/notifications/unsubscribe-auth/AQxPZo__NJcoBsDjlPXUZc0aHXlwl4Sjks5rH7eugaJpZM4LMPIH .
i see no reason why it shouldnt get corrected did you try applying the suggested patch?
Suggested via coala, right?
yes
Tried it. But I'll try once more tonight. See this https://travis-ci.org/NIT-dgp/UIP/builds/183728191
because that is still longer than 80 as shown by the bear, you have gtmake it smaller than that. Can you solve this on your own please? its simple really
Okay, I'll do it by night.
Will this be merged?
@hackrush01 I'm reviewing through my phone and I'm travelling till tomorrow afternoon. So I don't know how consistent I can be to get this merged very soon
Oh that's totally fine.
@hackrush01 did you check this for your college Proxies? is there a way to test this? can you add a test for it?
Yes, this works for college proxies. But I couldn't get you about that test thing! What is that? This works with or without proxies(if that's what you mean).
@hackrush01 i meant' could you write tests for this? so that we know it'll workfor all cases. See test_scrape.py
also you have a merge conflict
Added a method for retrieving proxy from system variables in scrape.py Fixes #178