diff --git a/djclick/adapter.py b/djclick/adapter.py index d8191d4..3d802fd 100644 --- a/djclick/adapter.py +++ b/djclick/adapter.py @@ -4,17 +4,10 @@ import click -from django import get_version, VERSION as DJANGO_VERSION +from django import get_version from django.core.management import CommandError -class OptionParseAdapter(object): - """Django pre-1.10-compatible adapter, deprecated""" - - def parse_args(self, args): - return (self, None) # NOCOV - - class ArgumentParserDefaults(object): def __init__(self, args): self._args = args @@ -80,10 +73,7 @@ def create_parser(self, progname, subcommand): """ Called when run through `call_command`. """ - if DJANGO_VERSION >= (1, 10): - return ArgumentParserAdapter() - else: # NOCOV - return OptionParseAdapter() + return ArgumentParserAdapter() def print_help(self, prog_name, subcommand): prog_name = "{} {}".format(prog_name, subcommand)