| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| try: | ||
| response, self._responses = self._responses[0], self._responses[1:] | ||
| except: | ||
| except Exception: |
| return _determine_default_project(project=project) | ||
|
|
||
| def test_it(self): | ||
|
|
| project = self._call_fut() | ||
|
|
||
| self.assertEqual(project, mock.sentinel.project) | ||
|
|
Jinx, bigly |
Sorry, something went wrong.
|
@tseaver I'm wondering if it's a bug in pycodestyle. I moved them around a little bit to try and see what it was looking for and that was the way it had to be to pass. We could probably disable that error. |
Sorry, something went wrong.
|
@daspecster Please provide the errors so we can try to help |
Sorry, something went wrong.
|
There were only two types of errors. One was the bare except and this was the other one. core/unit_tests/test__helpers.py:147:9: E306 expected 1 blank line before a nested definition, found 0 core/unit_tests/test_credentials.py:34:9: E306 expected 1 blank line before a nested definition, found 0 datastore/unit_tests/test_client.py:159:9: E306 expected 1 blank line before a nested definition, found 0 datastore/unit_tests/test_client.py:518:9: E306 expected 1 blank line before a nested definition, found 0 |
Sorry, something went wrong.
|
I vote to suppress that error with prejudice. |
Sorry, something went wrong.
|
I'd agree, we should suppress, but not before filing an issue with the pycodestyle folks |
Sorry, something went wrong.
|
SGTM, I'll update and I can file the issue on pycodestyle as well. |
Sorry, something went wrong.
|
There's a bare except in transaction.py that I'm not sure what the possible exception types could be. I think it could be a few things. If there is a known exception type for this then I can stop ignoring E306. |
Sorry, something went wrong.
|
The except in transaction.py is meant to be bare (it's somewhat of a special case). You can locally disable pycodestyle checks via noqa (e.g.) |
Sorry, something went wrong.
| self._id = self._client._connection.begin_transaction( | ||
| self.project) | ||
| except: | ||
| except: # noqa: E722 |
| else: | ||
| pycodestyle_command = ['pycodestyle'] + python_files | ||
| pycodestyle_command = ['pycodestyle', | ||
| '--ignore=E306,E123'] + python_files |
There was a problem hiding this comment.
LGTM if CI goes green
Sorry, something went wrong.
| self._id = self._client._connection.begin_transaction( | ||
| self.project) | ||
| except: | ||
| except: # noqa: E722 do not use bare except, specify exception instead |
Or except Exception, if it passes the linter. |
Sorry, something went wrong.
|
@lukesneeringer I am allergic to except Exception and that misses nasty exception types that only inherit from BaseException and pylint will complain about Exception being too broad |
Sorry, something went wrong.
|
Fair on all counts. :-) |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
These changes allow pycodestyle to pass.
Closes #2974