-
Notifications
You must be signed in to change notification settings - Fork 76
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
Add green mode incompatible bears list #290
Conversation
0090c12
to
128e4a0
Compare
coala_quickstart/Constants.py
Outdated
@@ -13,6 +13,9 @@ | |||
# This includes the bears from IMPORTANT_BEAR_LIST | |||
GREEN_MODE_COMPATIBLE_BEAR_LIST = {} | |||
|
|||
# This takes precedence over the other two bear lists. | |||
GREEN_MODE_INCOMPATIBLE_BEAR_LIST = {'FilenameBear'} |
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.
split into multiple lines so you can add entries to it later ?
tests/generation/BearsTest.py
Outdated
@@ -12,7 +12,9 @@ | |||
from coala_quickstart.coala_quickstart import main | |||
from coala_quickstart.coala_quickstart import _get_arg_parser | |||
from coala_quickstart.Constants import ( | |||
IMPORTANT_BEAR_LIST, ALL_CAPABILITIES) | |||
IMPORTANT_BEAR_LIST, ALL_CAPABILITIES, | |||
GREEN_MODE_INCOMPATIBLE_BEAR_LIST, |
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.
G is before I ?
tests/generation/BearsTest.py
Outdated
bear_obj_dict[key].update([x for x in bear_objs if ( | ||
x.__name__ == bear)]) | ||
if bear not in GREEN_MODE_INCOMPATIBLE_BEAR_LIST: | ||
bear_obj_dict[key].update([x for x in bear_objs if ( |
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.
start the [
on the next line
128e4a0
to
cd7bf66
Compare
cd7bf66
to
2e1c0ce
Compare
Travis tests have failedHey @ishanSrt, 1st Buildpytest
|
tests/generation/BearsTest.py
Outdated
@@ -158,8 +161,9 @@ def test_filter_relevant_bears_green_mode(self): | |||
for key in ['Python', 'C', 'All']: | |||
bear_obj_dict[key] = set() | |||
for bear in IMPORTANT_BEAR_LIST[key]: | |||
bear_obj_dict[key].update([x for x in bear_objs if ( | |||
x.__name__ == bear)]) | |||
if bear not in GREEN_MODE_INCOMPATIBLE_BEAR_LIST: |
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.
cripes.
if bear in GREEN_MODE_INCOMPATIBLE_BEAR_LIST:
continue
then you dont need to add indents to the previous line
2e1c0ce
to
2f9b545
Compare
tests/generation/BearsTest.py
Outdated
x.__name__ == bear)]) | ||
if bear in GREEN_MODE_INCOMPATIBLE_BEAR_LIST: | ||
continue | ||
bear_obj_dict[key].update( |
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.
as I said previously, this line doesnt need to be modified by you.
tests/generation/BearsTest.py
Outdated
bear_obj_dict[key].update([x for x in bear_objs if ( | ||
x.__name__ == bear)]) | ||
if bear in GREEN_MODE_INCOMPATIBLE_BEAR_LIST: | ||
continue |
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.
The code does not comply to PEP8.
Origin: PEP8Bear, Section: all.autopep8
.
The issue can be fixed by applying the following patch:
--- a/tmp/tmppeo8qrj0/tests/generation/BearsTest.py
+++ b/tmp/tmppeo8qrj0/tests/generation/BearsTest.py
@@ -162,7 +162,7 @@
bear_obj_dict[key] = set()
for bear in IMPORTANT_BEAR_LIST[key]:
if bear in GREEN_MODE_INCOMPATIBLE_BEAR_LIST:
- continue
+ continue
bear_obj_dict[key].update(
[x for x in bear_objs if (x.__name__ == bear)])
tests/generation/BearsTest.py
Outdated
bear_obj_dict[key].update([x for x in bear_objs if ( | ||
x.__name__ == bear)]) | ||
if bear in GREEN_MODE_INCOMPATIBLE_BEAR_LIST: | ||
continue |
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.
E111 indentation is not a multiple of four
Origin: PycodestyleBear (E111), Section: all.autopep8
.
Travis tests have failedHey @ishanSrt, 3rd Buildcoala --non-interactive
|
2f9b545
to
6c3116f
Compare
tests/generation/BearsTest.py
Outdated
@@ -158,8 +161,10 @@ def test_filter_relevant_bears_green_mode(self): | |||
for key in ['Python', 'C', 'All']: | |||
bear_obj_dict[key] = set() | |||
for bear in IMPORTANT_BEAR_LIST[key]: | |||
bear_obj_dict[key].update([x for x in bear_objs if ( |
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.
6c3116f
to
9d09432
Compare
ack 9d09432 |
* Constants.py: Add a list GREEN_MODE_INCOMPATIBLE_BEAR_LIST. * Bears.py: Remove bears from REQUIRED_BEAR_LIST that are present in GREEN_MODE_INCOMPATIBLE_BEAR_LIST when running green_mode. Add tests for the same.
9d09432
to
f26b264
Compare
ack f26b264 |
@gitmate-bot ff |
Hey! I'm GitMate.io! This pull request is being fastforwarded automatically. Please DO NOT push while fastforward is in progress or your changes would be lost permanently |
Automated fastforward with GitMate.io was successful! 🎉 |
in GREEN_MODE_INCOMPATIBLE_BEAR_LIST when running
green_mode.
Add tests for the same.