From 50632736bf8f256f59c170fd2195bc6c36845d8e Mon Sep 17 00:00:00 2001 From: giacomo Date: Wed, 27 Apr 2022 17:14:12 +0100 Subject: [PATCH] re-format with black --- src/debugpy/common/json.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/debugpy/common/json.py b/src/debugpy/common/json.py index fcedffe4..3502b09f 100644 --- a/src/debugpy/common/json.py +++ b/src/debugpy/common/json.py @@ -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: