summaryrefslogtreecommitdiff
path: root/src/flake8/options
diff options
context:
space:
mode:
authorIan Stapleton Cordasco <graffatcolmingov@gmail.com>2019-01-17 13:50:50 +0000
committerIan Stapleton Cordasco <graffatcolmingov@gmail.com>2019-01-17 13:50:50 +0000
commit0f3f4ff9b4e7901695484ee1ea1fbcbc19632149 (patch)
tree4d4f8780d1e2e965f5041e6abac04dd705bcdf73 /src/flake8/options
parent97e492755568928d804d2172ba71db578f4a39c4 (diff)
parentcc20e35058da474bd56eea7cf893a872506926e6 (diff)
downloadflake8-0f3f4ff9b4e7901695484ee1ea1fbcbc19632149.tar.gz
Merge branch 'master' into 'master'
Add support for optparse's 'float' and 'complex' types. Closes #452 See merge request pycqa/flake8!261
Diffstat (limited to 'src/flake8/options')
-rw-r--r--src/flake8/options/manager.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/flake8/options/manager.py b/src/flake8/options/manager.py
index 3f4e883..0ded13a 100644
--- a/src/flake8/options/manager.py
+++ b/src/flake8/options/manager.py
@@ -156,6 +156,10 @@ class Option(object):
value = self.normalize(value)
if self.type == "int" or self.action == "count":
return int(value)
+ elif self.type == "float":
+ return float(value)
+ elif self.type == "complex":
+ return complex(value)
if self.action in ("store_true", "store_false"):
value = str(value).upper()
if value in ("1", "T", "TRUE", "ON"):