-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add type hinting and integrate with pytest
- Loading branch information
Showing
116 changed files
with
5,394 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[pytest] | ||
addopts = --timeout=30 --cov=src --cov-report=html --ignore lib --ignore lib64 --strict-markers | ||
addopts = --timeout=30 --mypy --cov=src --cov-report=html --ignore lib --ignore lib64 --strict-markers | ||
testpaths = src/aramaki |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,24 @@ | ||
import uuid | ||
|
||
from sqlalchemy import Column, String, func | ||
from sqlalchemy.dialects.postgresql import UUID | ||
from sqlalchemy import func | ||
from sqlalchemy.orm import Mapped, mapped_column | ||
|
||
from .meta import Base | ||
from . import meta | ||
|
||
|
||
class System(Base): | ||
class System(meta.Base): | ||
__tablename__ = "system" | ||
|
||
id = Column( | ||
UUID(as_uuid=True), | ||
id: Mapped[uuid.UUID] = mapped_column( | ||
primary_key=True, | ||
default=uuid.uuid4, | ||
server_default=func.gen_random_uuid(), | ||
) | ||
|
||
title = Column(String, nullable=False) | ||
title: Mapped[str] | ||
|
||
# Make this a dictionary. | ||
type_ = Column(String, nullable=False) | ||
# Make this a dictionary, use references | ||
type_: Mapped[str] | ||
|
||
# XXX Turn into relationship | ||
primary_instance = Column(UUID(as_uuid=True)) | ||
primary_instance: Mapped[uuid.UUID] |
Oops, something went wrong.