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 8bc25eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/python/lsprotocol/_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,9 @@ def _references_provider_hook(
return converter.structure(object_, lsp_types.ReferenceOptions)

def _position_encoding_hook(
object_: Any, _: type
object_: Union[lsp_types.PositionEncodingKind, OptionalPrimitive], _: 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 8bc25eb

Please sign in to comment.