mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
re-format with black
This commit is contained in:
parent
eb8095cbe6
commit
50632736bf
1 changed files with 5 additions and 1 deletions
|
|
@ -108,7 +108,11 @@ def of_type(*classinfo, **kwargs):
|
|||
def validate(value):
|
||||
if (optional and value == ()) or isinstance(value, classinfo):
|
||||
return value
|
||||
elif isinstance(value, str) and all(x in string.digits + '.' for x in value) and any(issubclass(x, numbers.Number) for x in classinfo):
|
||||
elif (
|
||||
isinstance(value, str)
|
||||
and all(x in string.digits + "." for x in value)
|
||||
and any(issubclass(x, numbers.Number) for x in classinfo)
|
||||
):
|
||||
try:
|
||||
return int(value)
|
||||
except ValueError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue