Skip to content

Commit

Permalink
Add black to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Jaime committed Aug 5, 2020
1 parent bd9e0d5 commit e47fa84
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-app.yml
Expand Up @@ -42,8 +42,8 @@ jobs:
- name: Code style check
run: |
pipenv run flake8
pipenv run black . --check
- name: Test
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
Expand Down
1 change: 0 additions & 1 deletion django_feature_flip/helpers.py
@@ -1,4 +1,3 @@

from django_feature_flip.models import Group, Feature


Expand Down
6 changes: 3 additions & 3 deletions django_feature_flip/settings.py
Expand Up @@ -93,9 +93,9 @@
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', },
{'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', },
{'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', },
{'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator'},
{'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator'},
{'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator'},
]


Expand Down
8 changes: 6 additions & 2 deletions django_feature_flip/tests.py
Expand Up @@ -49,7 +49,9 @@ def test_enabled_for_non_existent_feature(self):
try:
self.feature_flip.enabled('non_existent_feature', actor)
except FeatureFlip.FeatureFlipError as error:
self.assertEqual(error.message, 'Feature non_existent_feature does not exist')
self.assertEqual(
error.message, 'Feature non_existent_feature does not exist'
)

def test_group_registration(self):
FeatureFactory(name='my_feature', totally_enabled=False)
Expand All @@ -76,7 +78,9 @@ def test_activate_group_for_non_existent_feature(self):
try:
self.feature_flip.activate_group('non_existent_feature', 'my_group')
except FeatureFlip.FeatureFlipError as error:
self.assertEqual(error.message, 'Feature non_existent_feature does not exist')
self.assertEqual(
error.message, 'Feature non_existent_feature does not exist'
)

def test_activate_group_for_non_existent_group(self):
FeatureFactory(name='my_feature')
Expand Down

0 comments on commit e47fa84

Please sign in to comment.