mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-10-22 19:02:23 +03:00
Merge pull request #3008 from yueguobin/fix/mypy-2-4-username-mapped
Fix mypy 2.4 type error on User.username and bump mypy to 2.4.0
This commit is contained in:
commit
5514b2e929
@ -6,5 +6,5 @@ httpx_ws==0.7.2 # upgrading leads to failures in tests
|
|||||||
pytest-random-order==1.2.0 # opt-in: --random-order --random-order-bucket=global (legacy suites are not shuffle-clean yet, see .claude/skills/gns3-api-test-writing)
|
pytest-random-order==1.2.0 # opt-in: --random-order --random-order-bucket=global (legacy suites are not shuffle-clean yet, see .claude/skills/gns3-api-test-writing)
|
||||||
pytest-cov==7.1.0
|
pytest-cov==7.1.0
|
||||||
ruff==0.16.9
|
ruff==0.16.9
|
||||||
mypy==2.3.1
|
mypy==2.4.0
|
||||||
rust-just==1.58.0 # provides the `just` command runner, see justfile
|
rust-just==1.58.0 # provides the `just` command runner, see justfile
|
||||||
|
|||||||
@ -42,7 +42,9 @@ class User(BaseTable):
|
|||||||
__tablename__ = "users"
|
__tablename__ = "users"
|
||||||
|
|
||||||
user_id = Column(GUID, primary_key=True, default=generate_uuid)
|
user_id = Column(GUID, primary_key=True, default=generate_uuid)
|
||||||
username = Column(String, unique=True, index=True)
|
# Mapped style so type checkers see `str` instead of `Column[str]`; the explicit
|
||||||
|
# nullable=True keeps the schema identical to the former Column(String) declaration.
|
||||||
|
username: Mapped[str] = mapped_column(String, unique=True, index=True, nullable=True)
|
||||||
email = Column(String, unique=True, index=True)
|
email = Column(String, unique=True, index=True)
|
||||||
full_name = Column(String)
|
full_name = Column(String)
|
||||||
hashed_password = Column(String)
|
hashed_password = Column(String)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user