Skip to content

Commit

Permalink
fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
aquamatthias committed Oct 30, 2023
1 parent 83fa822 commit dad4090
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fixcloudutils/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import logging
from typing import Any, TypeVar, Dict, List, Type, AsyncContextManager
from typing import Any, TypeVar, Dict, List, Type, AsyncContextManager, Tuple

ServiceType = TypeVar("ServiceType", bound="Service")
T = TypeVar("T")
Expand Down Expand Up @@ -60,8 +60,8 @@ def extend(self, **deps: Any) -> "Dependencies":
return self

@property
def services(self) -> List[(str, AsyncContextManager[Any])]:
return [(k,v) for k, v in self.lookup.items() if isinstance(v, AsyncContextManager)]
def services(self) -> List[Tuple[str, AsyncContextManager[Any]]]:
return [(k, v) for k, v in self.lookup.items() if isinstance(v, AsyncContextManager)]

def service(self, name: str, clazz: Type[T]) -> T:
if isinstance(existing := self.lookup.get(name), clazz):
Expand Down

0 comments on commit dad4090

Please sign in to comment.