Skip to content

Commit 7a96380

Browse files
committed
Added initial PEP8 rc file
1 parent 4c41997 commit 7a96380

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

CONTRIBUTING.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ and ensure the documentation is generating.
6565
$ pip install tox
6666
$ tox
6767
68+
You also need to ensure your code is PEP8 compliant (following the project rules: see ``pep8.rc`` file):
69+
70+
.. code-block:: console
71+
72+
$ make pep8
73+
6874
6975
**Don't forget client-side code and tests.**
7076

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ coverage:
3737
@coverage report --rcfile=coverage.rc
3838

3939
pep8:
40-
@pep8 $(PACKAGE) --max-line-length=120 --ignore=E128,E122,E125 && echo 'PEP8: OK'
40+
@pep8 $(PACKAGE) --config=pep8.rc
41+
@echo 'PEP8: OK'
4142

4243
pylint:
4344
@pylint --rcfile=pylint.rc $(PACKAGE)
@@ -47,9 +48,8 @@ doc:
4748
@cd $(DOCDIR) && make html
4849
@echo 'Done'
4950

50-
dist:
51+
dist: minify
5152
@echo 'Generating a distributable python package'
52-
@./minify.sh
5353
@python setup.py sdist
5454
@echo 'Done'
5555

djangojs/tests/test_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def test_user_disabled(self):
234234
def test_context_whitelist(self):
235235
'''Should only include context variable from settings.JS_CONTEXT if set'''
236236
result = self.process_request()
237-
self.assertEqual(len(result.keys()), 2 + 1) #: User is always in context
237+
self.assertEqual(len(result.keys()), 2 + 1) # User is always in context
238238
self.assertIn('STATIC_URL', result)
239239
self.assertIn('LANGUAGE_CODE', result)
240240

pep8.rc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[pep8]
2+
ignore = E128,E122,E125
3+
max-line-length = 120

0 commit comments

Comments
 (0)