Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ python:
- "3.6"

env:
matrix:
- TOXENV=dj22
- TOXENV=dj30

- TOXENV=flake8
- TOXENV=dj22
- TOXENV=dj30

cache:
directories:
Expand All @@ -27,14 +24,12 @@ cache:
install:
- pip install flake8 tox 'coverage<5' coveralls

jobs:
include:
- name: flake8
python: "3.6"
script: flake8 djclick

script:
- tox -e $TOXENV
- coverage report
- coverage html
- coveralls

jobs:
include:
- script: tox -e flake8
4 changes: 1 addition & 3 deletions djclick/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
import sys
from functools import update_wrapper

import six

import click

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

# Update the context with the passed (renamed) kwargs
Expand Down
6 changes: 0 additions & 6 deletions djclick/test/test_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import codecs
import subprocess

import six

import pytest

import click
Expand All @@ -16,10 +14,6 @@
import djclick


todo = pytest.mark.xfail(reason="TODO")


@pytest.mark.skipif(not six.PY3, reason="Only necessary on Python3")
def test_not_ascii(): # NOCOV
"""
Make sure that the systems preferred encoding is not `ascii`.
Expand Down
4 changes: 0 additions & 4 deletions djclick/test/testprj/testapp/models.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
from __future__ import unicode_literals

from django.db import models
from six import python_2_unicode_compatible


@python_2_unicode_compatible
class DummyModel(models.Model):
slug = models.CharField(max_length=50)

Expand Down
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ check-manifest
flake8
mccabe
pep8
flake8-todo
pep8-naming
pyflakes

Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
six>=1.9.0
click>=7.1,<7.2
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
]


Expand Down
10 changes: 9 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# By moving it out of the way (~500MB), we trim test execution time by > 80%.
toxworkdir = {homedir}/.toxenvs/django-click
envlist =
dj{22,30}
dj{22,30},flake8

[testenv]
usedevelop = true
Expand All @@ -17,3 +17,11 @@ deps =
dj22: django>=2.2,<2.3
dj30: django>=3.0,<3.1
commands = py.test -rxs --cov-report= --cov-append --cov djclick {posargs:djclick}


[testenv:flake8]
commands = flake8 djclick


[flake8]
max-line-length = 100