Skip to content

Commit

Permalink
plugins: use Union in place of | syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
SnoopJ committed Nov 4, 2023
1 parent 9e45e9a commit 3932025
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sopel/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import itertools
import logging
import os
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, Union

# TODO: use stdlib importlib.metadata when possible, after dropping py3.9.
# Stdlib does not support `entry_points(group='filter')` until py3.10, but
Expand All @@ -50,7 +50,7 @@
LOGGER = logging.getLogger(__name__)


def _list_plugin_filenames(directory: str | os.PathLike) -> Iterable[tuple[str, str]]:
def _list_plugin_filenames(directory: Union[str, os.PathLike]) -> Iterable[tuple[str, str]]:
# list plugin filenames from a directory
# yield 2-value tuples: (name, absolute path)
base = os.path.abspath(directory)
Expand Down

0 comments on commit 3932025

Please sign in to comment.