Skip to content

Commit 07ca2ee

Browse files
authored
Merge pull request #21 from Djailla/cleanup
[cleanup] Code cleanup
2 parents afddc75 + 66b578e commit 07ca2ee

File tree

8 files changed

+19
-30
lines changed

8 files changed

+19
-30
lines changed

.travis.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,8 @@ python:
1414
- "3.6"
1515

1616
env:
17-
matrix:
18-
- TOXENV=dj22
19-
- TOXENV=dj30
20-
21-
- TOXENV=flake8
17+
- TOXENV=dj22
18+
- TOXENV=dj30
2219

2320
cache:
2421
directories:
@@ -27,14 +24,12 @@ cache:
2724
install:
2825
- pip install flake8 tox 'coverage<5' coveralls
2926

30-
jobs:
31-
include:
32-
- name: flake8
33-
python: "3.6"
34-
script: flake8 djclick
35-
3627
script:
3728
- tox -e $TOXENV
3829
- coverage report
3930
- coverage html
4031
- coveralls
32+
33+
jobs:
34+
include:
35+
- script: tox -e flake8

djclick/adapter.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
import sys
33
from functools import update_wrapper
44

5-
import six
6-
75
import click
86

97
from django import get_version, VERSION as DJANGO_VERSION
@@ -110,7 +108,7 @@ def execute(self, *args, **kwargs):
110108
# Rename kwargs to to the appropriate destination argument name
111109
opt_mapping = dict(self.map_names())
112110
arg_options = {
113-
opt_mapping.get(key, key): value for key, value in six.iteritems(kwargs)
111+
opt_mapping.get(key, key): value for key, value in kwargs.items()
114112
}
115113

116114
# Update the context with the passed (renamed) kwargs

djclick/test/test_adapter.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import codecs
44
import subprocess
55

6-
import six
7-
86
import pytest
97

108
import click
@@ -16,10 +14,6 @@
1614
import djclick
1715

1816

19-
todo = pytest.mark.xfail(reason="TODO")
20-
21-
22-
@pytest.mark.skipif(not six.PY3, reason="Only necessary on Python3")
2317
def test_not_ascii(): # NOCOV
2418
"""
2519
Make sure that the systems preferred encoding is not `ascii`.

djclick/test/testprj/testapp/models.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
from __future__ import unicode_literals
2-
31
from django.db import models
4-
from six import python_2_unicode_compatible
52

63

7-
@python_2_unicode_compatible
84
class DummyModel(models.Model):
95
slug = models.CharField(max_length=50)
106

requirements-dev.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ check-manifest
1212
flake8
1313
mccabe
1414
pep8
15-
flake8-todo
1615
pep8-naming
1716
pyflakes
1817

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
six>=1.9.0
21
click>=7.1,<7.2

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
"License :: OSI Approved :: MIT License",
1919
"Operating System :: OS Independent",
2020
"Programming Language :: Python",
21-
"Programming Language :: Python :: 2.7",
2221
"Programming Language :: Python :: 3",
23-
"Programming Language :: Python :: 3.3",
24-
"Programming Language :: Python :: 3.4",
22+
"Programming Language :: Python :: 3.6",
23+
"Programming Language :: Python :: 3.7",
24+
"Programming Language :: Python :: 3.8",
2525
]
2626

2727

tox.ini

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# By moving it out of the way (~500MB), we trim test execution time by > 80%.
55
toxworkdir = {homedir}/.toxenvs/django-click
66
envlist =
7-
dj{22,30}
7+
dj{22,30},flake8
88

99
[testenv]
1010
usedevelop = true
@@ -17,3 +17,11 @@ deps =
1717
dj22: django>=2.2,<2.3
1818
dj30: django>=3.0,<3.1
1919
commands = py.test -rxs --cov-report= --cov-append --cov djclick {posargs:djclick}
20+
21+
22+
[testenv:flake8]
23+
commands = flake8 djclick
24+
25+
26+
[flake8]
27+
max-line-length = 100

0 commit comments

Comments
 (0)