Skip to content

Commit

Permalink
Change union syntax for compatibility with older Python
Browse files Browse the repository at this point in the history
  • Loading branch information
pappasam committed Nov 18, 2023
1 parent 8f6e176 commit 2d0d26b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jedi_language_server/jedi_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import threading
from ast import PyCF_ONLY_AST
from inspect import Parameter
from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple
from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Union

import docstring_to_markdown
import jedi.api.errors
Expand Down Expand Up @@ -424,7 +424,7 @@ def clean_completion_name(name: str, char_before_cursor: str) -> str:
_PARAM_NAME_IGNORE = {"/", "*"}


def get_snippet_signature(signature: Signature | BaseSignature) -> str:
def get_snippet_signature(signature: Union[Signature, BaseSignature]) -> str:
"""Return the snippet signature."""
params: List[ParamName] = signature.params
if not params:
Expand Down

0 comments on commit 2d0d26b

Please sign in to comment.