Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove Python2 comptability code #291

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
7 changes: 2 additions & 5 deletions configargparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@
import sys
import types
from collections import OrderedDict
import textwrap
from io import StringIO

if sys.version_info >= (3, 0):
from io import StringIO
else:
from StringIO import StringIO
import textwrap


ACTION_TYPES_THAT_DONT_NEED_A_VALUE = [argparse._StoreTrueAction,
Expand Down
6 changes: 1 addition & 5 deletions tests/test_configargparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,13 @@
import tempfile
import types
import unittest
from io import StringIO

try:
import mock
except ImportError:
from unittest import mock

if sys.version_info >= (3, 0):
from io import StringIO
else:
from StringIO import StringIO

if sys.version_info >= (3, 10):
OPTIONAL_ARGS_STRING="options"
else:
Expand Down