Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump mypy from 0.931 to 1.9.0 #119

Merged
merged 2 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aql/column.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class Column:
def __init__(
self,
name: str,
ctype: Type = None,
ctype: Optional[Type] = None,
default: Any = NO_DEFAULT,
table_name: str = "",
) -> None:
Expand Down
2 changes: 1 addition & 1 deletion aql/engines/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def last_id(self) -> Optional[int]:
"""ID of last modified row, or None if not available."""
raise self._cursor.lastrowid

def convert(self, row) -> T:
def convert(self, row) -> T: # type: ignore[type-var]
"""Convert from the cursor's native data type to the query object type."""
if self._query:
return self._query.table(row)
Expand Down
2 changes: 1 addition & 1 deletion aql/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def orderby(self, column: Column, *args: Union[Column, Order, str]) -> "Query[T]
return self

@only()
def limit(self, n: int, offset: int = None) -> "Query[T]":
def limit(self, n: int, offset: Optional[int] = None) -> "Query[T]":
self._limit = n
self._offset = offset
return self
Expand Down
5 changes: 4 additions & 1 deletion aql/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ class Table(Generic[T]):
"""Table specification using custom columns and a source type."""

def __init__(
self, name: str, cons: Iterable[Union[Column, Index]], source: Type[T] = None
self,
name: str,
cons: Iterable[Union[Column, Index]],
source: Optional[Type[T]] = None,
) -> None:
self._name = name
self._columns: List[Column] = []
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dev = [
"flake8==7",
"flake8-bugbear==24.4.21",
"flit==3.9.0",
"mypy==0.931",
"mypy==1.9.0",
"usort==1.0.8.post1",
]
docs = [
Expand Down