Skip to content

Commit 2c04828

Browse files
authored
Merge pull request #44 from ulgens/remove_compat_pre_dj1.10
Remove Django <1.10 compatability code
2 parents ded5b1f + 4ae35fc commit 2c04828

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

Diff for: djclick/adapter.py

+2-12
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,10 @@
44

55
import click
66

7-
from django import get_version, VERSION as DJANGO_VERSION
7+
from django import get_version
88
from django.core.management import CommandError
99

1010

11-
class OptionParseAdapter(object):
12-
"""Django pre-1.10-compatible adapter, deprecated"""
13-
14-
def parse_args(self, args):
15-
return (self, None) # NOCOV
16-
17-
1811
class ArgumentParserDefaults(object):
1912
def __init__(self, args):
2013
self._args = args
@@ -80,10 +73,7 @@ def create_parser(self, progname, subcommand):
8073
"""
8174
Called when run through `call_command`.
8275
"""
83-
if DJANGO_VERSION >= (1, 10):
84-
return ArgumentParserAdapter()
85-
else: # NOCOV
86-
return OptionParseAdapter()
76+
return ArgumentParserAdapter()
8777

8878
def print_help(self, prog_name, subcommand):
8979
prog_name = "{} {}".format(prog_name, subcommand)

0 commit comments

Comments
 (0)