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 1f8d58f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

from django_feature_flip.models import Group, Feature


Expand Down
10 changes: 4 additions & 6 deletions django_feature_flip/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,10 @@
# https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
{
'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.UserAttributeSimilarityValidator'},
{'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator'},
{'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator'},
{'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator'},
]


Expand Down
4 changes: 1 addition & 3 deletions django_feature_flip/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ def test_uniqueness_of_name(self):

def test_max_of_40_characters_of_name(self):
with self.assertRaises(DataError):
FeatureFactory(
name='This is a very large name, features should have short names'
)
FeatureFactory(name='This is a very large name, features should have short names')


class FeatureFlipTestCase(TestCase):
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[tool.black]
skip_string_normalization = true
line-length = 120
exclude = '.*\/migrations\/.*'

0 comments on commit 1f8d58f

Please sign in to comment.