Shopify / shopify_python

Python development standards at Shopify
MIT License
66 stars 13 forks source link

Add unary operators and resilience against unrecognized operators #74

Open erikwright opened 7 years ago

erikwright commented 7 years ago

@cfournie PTAL. Solves the following:

[2017-06-03T04:28:19Z]   File "/app/.tox/pylint/src/pylint/pylint/utils.py", line 970, in walk
[2017-06-03T04:28:19Z]     cb(astroid)
[2017-06-03T04:28:19Z]   File "/app/.tox/pylint/lib/python3.5/site-packages/shopify_python/google_styleguide.py", line 145, in visit_lambda
[2017-06-03T04:28:19Z]     self.__lambda_func(node)
[2017-06-03T04:28:19Z]   File "/app/.tox/pylint/lib/python3.5/site-packages/shopify_python/google_styleguide.py", line 298, in __lambda_func
[2017-06-03T04:28:19Z]     operator = self.BINARY_OPERATORS[node.op]
[2017-06-03T04:28:19Z] KeyError: '&'

This change is Reviewable