Skip to content

Commit cefb6db

Browse files
Micah CochranMicah Cochran
authored andcommitted
Removed argparse
Removed argparse and went with a simple scanning sys.argv for parameter approach per the comments of @WeatherGod . unittest already takes the '-v' commandline argument. It may be acting upon having this. (I don't know because there are so many warnings generated by test.py.)
1 parent 1c0c378 commit cefb6db

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

.requirements-2.6.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
argparse
21
unittest2

lib/mpl_toolkits/basemap/test.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -210,18 +210,12 @@ def test():
210210
# give package dependent version information:
211211
# $ python test.py --verbose
212212

213-
import argparse # standard module in Python >= 2.7 and >= 3.2
213+
import sys
214214
import unittest
215215

216216
from mpl_toolkits.basemap.diagnostic import package_versions
217217

218-
parser = argparse.ArgumentParser()
219-
parser.add_argument('-v', '--verbose',action='count')
220-
args = parser.parse_args()
221-
222-
# VERBOSITY will default to None if not a parameter
223-
VERBOSITY = vars(args)['verbose']
224-
if VERBOSITY != None:
218+
if '--verbose' in sys.argv or '-v' in sys.argv:
225219
pkg_vers = package_versions()
226220
print('Basemaps installed package versions:')
227221
print('{0}\n'.format(pkg_vers))

0 commit comments

Comments
 (0)