Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

Commit 549ff1b

Browse files
committed
Remove unused Number type
1 parent ea6d332 commit 549ff1b

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

paperspace/cli/types.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,6 @@ def convert(self, value, param, ctx):
1515
return self.type_map[value]
1616

1717

18-
class Number(click.ParamType):
19-
name = "number"
20-
21-
def convert(self, value, param, ctx):
22-
try:
23-
number = int(value)
24-
except ValueError:
25-
try:
26-
number = float(value)
27-
except ValueError:
28-
self.fail('{} is not a valid number'.format(value), param, ctx)
29-
30-
return number
31-
32-
3318
def json_string(val):
3419
"""Wraps json.loads so the cli help shows proper option's type name instead of 'LOADS'"""
3520
return json.loads(val)

0 commit comments

Comments
 (0)