Skip to content

Commit

Permalink
Fix TypeVar definition. (#297)
Browse files Browse the repository at this point in the history
Closes #295

Co-authored-by: Steve Bate <svc-atlassian@stevebate.net>
  • Loading branch information
steve-bate and Steve Bate authored Aug 6, 2024
1 parent 538f034 commit 71e3ad1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/feditest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
Core module.
"""

import importlib
from collections.abc import Callable
from enum import Enum
import importlib
from inspect import getmembers, getmodule, isfunction
from types import FunctionType
from typing import Any, Type, TypeVar, cast
Expand All @@ -13,14 +13,14 @@
from hamcrest.core.string_description import StringDescription

import feditest.protocols
from feditest.registry import Registry
from feditest.reporting import fatal, warning
from feditest.tests import (
Test,
TestFromTestClass,
TestFromTestFunction,
TestStepInTestClass,
)
from feditest.registry import Registry
from feditest.utils import load_python_from

T = TypeVar("T")
Expand Down Expand Up @@ -176,9 +176,9 @@ def load_node_drivers_from(dirs: list[str]) -> None:
# Holds all node drivers
all_node_drivers : dict[str,Type[Any]]= {}

TDriver = TypeVar('NodeDriver')
TNodeDriver = TypeVar('TNodeDriver')

def nodedriver(to_register: Type[TDriver]) -> Type[TDriver]:
def nodedriver(to_register: Type[TNodeDriver]) -> Type[TNodeDriver]:
"""
Used as decorator of NodeDriver classes, like this:
Expand Down

0 comments on commit 71e3ad1

Please sign in to comment.