Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
karthiknadig committed Sep 15, 2023
1 parent 6857f44 commit 52d258f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 1 addition & 5 deletions packages/python/lsprotocol/_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,7 @@ def _references_provider_hook(
def _position_encoding_hook(
object_: Any, _: type
) -> Union[lsp_types.PositionEncodingKind, OptionalPrimitive]:
if object_ is None:
return None
if isinstance(object_, (bool, int, str, float)):
return object_
return converter.structure(object_, lsp_types.ReferenceOptions)
return object_

def _document_highlight_provider_hook(
object_: Any, _: type
Expand Down
1 change: 1 addition & 0 deletions tests/python/test_cattrs_special_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under the MIT License.

from typing import Optional, Union

import attrs
import hamcrest
import pytest
Expand Down

0 comments on commit 52d258f

Please sign in to comment.