Skip to content

Commit

Permalink
fix: simplify option validation check
Browse files Browse the repository at this point in the history
  • Loading branch information
karthiknadig authored and tombh committed Nov 10, 2023
1 parent 95ae6ea commit 7e9c272
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pygls/lsp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ def get_method_return_type(method_name, lsp_methods_map=METHOD_TO_TYPES):

def is_instance(cv: cattrs.Converter, o, t):
try:
v = cv.unstructure(o, t)
cv.structure(v, t)
cv.unstructure(o, t)
return True
except TypeError:
return False

0 comments on commit 7e9c272

Please sign in to comment.