diff options
author | David Lord <davidism@gmail.com> | 2020-03-06 14:38:03 -0800 |
---|---|---|
committer | David Lord <davidism@gmail.com> | 2020-03-06 14:38:03 -0800 |
commit | 5f75f9ec38ccf2ddac4e6b92cc07fec6d9b1b7e0 (patch) | |
tree | aa8b7c6a539db2615e659ae81fa42af7527a78ea /src/click/types.py | |
parent | 93ba3ba112d2f8ba7bdd8b231e510f74dd0b037e (diff) | |
download | click-5f75f9ec38ccf2ddac4e6b92cc07fec6d9b1b7e0.tar.gz |
apply flake8
Diffstat (limited to 'src/click/types.py')
-rw-r--r-- | src/click/types.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/click/types.py b/src/click/types.py index 1d3d5b3..0987190 100644 --- a/src/click/types.py +++ b/src/click/types.py @@ -261,7 +261,7 @@ class IntParamType(ParamType): def convert(self, value, param, ctx): try: return int(value) - except (ValueError, UnicodeError): + except ValueError: self.fail("%s is not a valid integer" % value, param, ctx) def __repr__(self): @@ -329,7 +329,7 @@ class FloatParamType(ParamType): def convert(self, value, param, ctx): try: return float(value) - except (UnicodeError, ValueError): + except ValueError: self.fail("%s is not a valid floating point value" % value, param, ctx) def __repr__(self): @@ -418,7 +418,7 @@ class UUIDParameterType(ParamType): if PY2 and isinstance(value, text_type): value = value.encode("ascii") return uuid.UUID(value) - except (UnicodeError, ValueError): + except ValueError: self.fail("%s is not a valid UUID value" % value, param, ctx) def __repr__(self): @@ -502,7 +502,7 @@ class File(ParamType): else: ctx.call_on_close(safecall(f.flush)) return f - except (IOError, OSError) as e: + except (IOError, OSError) as e: # noqa: B014 self.fail( "Could not open file: %s: %s" % (filename_to_ui(value), get_streerror(e),), |