From 7888e31f6492bc7edb67ac42bada03e2896764f1 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Fri, 16 Sep 2022 06:55:54 +0200 Subject: [PATCH] Use argparse API for flake8 >= 3.8.0 Fixes #60 --- src/flake8_requirements/checker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flake8_requirements/checker.py b/src/flake8_requirements/checker.py index 9dd5dc2..19884ba 100644 --- a/src/flake8_requirements/checker.py +++ b/src/flake8_requirements/checker.py @@ -18,7 +18,7 @@ from .modules import STDLIB_PY3 # NOTE: Changing this number will alter package version as well. -__version__ = "1.7.0" +__version__ = "1.7.1" __license__ = "MIT" LOG = getLogger('flake8.plugin.requirements') @@ -353,7 +353,7 @@ def add_options(cls, manager): ) manager.add_option( "--requirements-max-depth", - type="int", + type=int if flake8.__version__ >= '3.8.0' else 'int', default=1, help=( "Max depth to resolve recursive requirements. Defaults to 1 "