Skip to content

Commit

Permalink
fix: typing
Browse files Browse the repository at this point in the history
  • Loading branch information
severinsimmler committed Jan 13, 2023
1 parent 7fb555b commit 8f7cd64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions databank/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import json
from datetime import datetime
from typing import Any, Mapping, Union
from typing import Any, Mapping, Optional, Union

from sqlalchemy import text
from sqlalchemy.engine.interfaces import Dialect
Expand Down Expand Up @@ -61,7 +61,7 @@ def serialize_param(param: Any) -> Value:
raise ValueError(f"{type(param)} is not serializable")


def compile_sql(query: str, params: Mapping = {}, dialect: Dialect | None = None) -> str:
def compile_sql(query: str, params: Mapping = {}, dialect: Optional[Dialect] = None) -> str:
"""Compile the given query and bind the parameters to get the actual SQL query.
Parameters
Expand All @@ -70,7 +70,7 @@ def compile_sql(query: str, params: Mapping = {}, dialect: Dialect | None = None
SQL query to execute.
params : Mapping
Parameters to bind to the query.
dialect : Dialect | None
dialect : Optional[Dialect]
SQL dialect.
Returns
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "databank"
version = "0.3.0"
version = "0.3.1"
description = "Databank is an easy-to-use Python library for making raw SQL queries in a multi-threaded environment."
readme = "README.md"
authors = ["snapADDY GmbH <[email protected]>"]
Expand Down

0 comments on commit 8f7cd64

Please sign in to comment.