Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
theCapypara committed Jan 12, 2022
2 parents 63b2993 + 81711a5 commit 29841c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions riptide/db/driver/db_driver_for_service.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Module to resolve database drivers for services"""
from typing import Union, TYPE_CHECKING
from typing import Union, TYPE_CHECKING, Optional

import pkg_resources

Expand All @@ -11,9 +11,11 @@
DB_DRIVER_ENTRYPOINT_KEY = 'riptide.db_driver'


def get(service_data: dict, service: 'Service') -> Union[AbstractDbDriver, None]:
def get(service_data: Union['Service', dict], service: Optional['Service'] = None) -> Union[AbstractDbDriver, None]:
"""Returns the db driver instance for this service, if a driver is defined."""
# Look up package entrypoints for db drivers
if service is None:
service = service_data
drivers = {
entry_point.name:
entry_point.load() for entry_point in pkg_resources.iter_entry_points(DB_DRIVER_ENTRYPOINT_KEY)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = '0.7.0'
__version__ = '0.7.1'
from setuptools import setup, find_packages

# README read-in
Expand Down

0 comments on commit 29841c4

Please sign in to comment.