Skip to content

Commit

Permalink
🚨 fix: lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
StummeJ committed Feb 27, 2024
1 parent b03cb80 commit cdf4ff0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
1 change: 1 addition & 0 deletions tests/test_fn_exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Functions exec tests.
exec functions are designed to enable executing any function injecting parameters.
"""

import pytest

from rodi import Container, inject
Expand Down
24 changes: 8 additions & 16 deletions tests/test_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -2337,17 +2337,15 @@ def factory() -> annotation:


def test_factory_without_locals_raises():
def factory_without_context() -> None:
...
def factory_without_context() -> None: ...

with pytest.raises(FactoryMissingContextException):
_get_factory_annotations_or_throw(factory_without_context)


def test_factory_with_locals_get_annotations():
@inject()
def factory_without_context() -> "Cat":
...
def factory_without_context() -> "Cat": ...

annotations = _get_factory_annotations_or_throw(factory_without_context)

Expand All @@ -2364,21 +2362,17 @@ def test_deps_github_scenario():
└── HTTPClient
"""

class HTTPClient:
...
class HTTPClient: ...

class CommentsService:
...
class CommentsService: ...

class ChecksService:
...
class ChecksService: ...

class CLAHandler:
comments_service: CommentsService
checks_service: ChecksService

class GitHubSettings:
...
class GitHubSettings: ...

class GitHubAuthHandler:
settings: GitHubSettings
Expand Down Expand Up @@ -2494,11 +2488,9 @@ def test_provide_protocol_generic() -> None:
T = TypeVar("T")

class P(Protocol[T]):
def foo(self, t: T) -> T:
...
def foo(self, t: T) -> T: ...

class A:
...
class A: ...

class Impl(P[A]):
def foo(self, t: A) -> A:
Expand Down

0 comments on commit cdf4ff0

Please sign in to comment.