diff --git a/aliases/sakuragasaki46_suou/pyproject.toml b/aliases/sakuragasaki46_suou/pyproject.toml index 6764e6f..39ad228 100644 --- a/aliases/sakuragasaki46_suou/pyproject.toml +++ b/aliases/sakuragasaki46_suou/pyproject.toml @@ -10,7 +10,7 @@ license = "Apache-2.0" readme = "README.md" dependencies = [ - "suou==0.7.7", + "suou==0.8.0", "itsdangerous", "toml", "pydantic", diff --git a/src/suou/__init__.py b/src/suou/__init__.py index a0f3a65..342e5c7 100644 --- a/src/suou/__init__.py +++ b/src/suou/__init__.py @@ -37,7 +37,7 @@ from .redact import redact_url_password from .http import WantsContentType from .color import chalk -__version__ = "0.8.0" +__version__ = "0.8.1" __all__ = ( 'ConfigOptions', 'ConfigParserConfigSource', 'ConfigSource', 'ConfigValue', diff --git a/src/suou/sqlalchemy/orm.py b/src/suou/sqlalchemy/orm.py index 9e0ee91..05271eb 100644 --- a/src/suou/sqlalchemy/orm.py +++ b/src/suou/sqlalchemy/orm.py @@ -255,6 +255,8 @@ def unbound_fk(target: str | Column | InstrumentedAttribute, typ: _T | None = No target_name = target if typ is None: typ = IdType + else: + raise TypeError('target must be a str, a Column or a InstrumentedAttribute') return Column(typ, ForeignKey(target_name, ondelete='SET NULL'), nullable=True, **kwargs) @@ -276,6 +278,8 @@ def bound_fk(target: str | Column | InstrumentedAttribute, typ: _T = None, **kwa target_name = target if typ is None: typ = IdType + else: + raise TypeError('target must be a str, a Column or a InstrumentedAttribute') return Column(typ, ForeignKey(target_name, ondelete='CASCADE'), nullable=False, **kwargs)