[chore] remove unnessary type hint

This commit is contained in:
SouthFox 2023-07-29 10:12:40 +08:00
parent 670cb72df7
commit 00e051a8a2

View file

@ -33,7 +33,7 @@ class Actor(Base, BaseActor):
created_at = Column(DateTime(timezone=True), nullable=False, default=now) created_at = Column(DateTime(timezone=True), nullable=False, default=now)
updated_at = Column(DateTime(timezone=True), nullable=False, default=now) updated_at = Column(DateTime(timezone=True), nullable=False, default=now)
ap_id: Mapped[str] = Column(String, unique=True, nullable=False, index=True) # type: ignore ap_id = Column(String, unique=True, nullable=False, index=True)
ap_actor = Column(JSON, nullable=False) ap_actor = Column(JSON, nullable=False)
ap_type = Column(String, nullable=False) ap_type = Column(String, nullable=False)
@ -58,10 +58,10 @@ class InboxObject(Base):
ap_actor_id = Column(String, nullable=False) ap_actor_id = Column(String, nullable=False)
ap_type = Column(String, nullable=False, index=True) ap_type = Column(String, nullable=False, index=True)
ap_id: Mapped[str] = Column(String, nullable=False, unique=True, index=True) # type: ignore ap_id = Column(String, nullable=False, unique=True, index=True)
ap_context = Column(String, nullable=True) ap_context = Column(String, nullable=True)
ap_published_at = Column(DateTime(timezone=True), nullable=False) ap_published_at = Column(DateTime(timezone=True), nullable=False)
ap_object: Mapped[dict[str, Any] | None] = Column(JSON, nullable=False) # type: ignore ap_object = Column(JSON, nullable=False)
activity_object_ap_id = Column(String, nullable=True, index=True) activity_object_ap_id = Column(String, nullable=True, index=True)
visibility = Column(Enum(ap.VisibilityEnum), nullable=False) visibility = Column(Enum(ap.VisibilityEnum), nullable=False)
@ -100,9 +100,9 @@ class OutboxObject(Base):
slug = Column(String, nullable=True, index=True) slug = Column(String, nullable=True, index=True)
ap_type = Column(String, nullable=False, index=True) ap_type = Column(String, nullable=False, index=True)
ap_id: Mapped[str] = Column(String, nullable=False, unique=True, index=True) # type: ignore ap_id = Column(String, nullable=False, unique=True, index=True)
ap_context = Column(String, nullable=True) ap_context = Column(String, nullable=True)
ap_object: Mapped[ap.RawObject] = Column(JSON, nullable=False) #type: ignore ap_object = Column(JSON, nullable=False)
activity_object_ap_id = Column(String, nullable=True, index=True) activity_object_ap_id = Column(String, nullable=True, index=True)
@ -111,7 +111,7 @@ class OutboxObject(Base):
is_deleted = Column(Boolean, nullable=False, default=False) is_deleted = Column(Boolean, nullable=False, default=False)
likes_count = Column(Integer, nullable=False, default=0) likes_count = Column(Integer, nullable=False, default=0)
announces_count = Column(Integer, nullable=False, default=0) announces_count = Column(Integer, nullable=False, default=0)
replies_count: Mapped[int] = Column(Integer, nullable=False, default=0) #type: ignore replies_count = Column(Integer, nullable=False, default=0)
relates_to_inbox_object_id = Column( relates_to_inbox_object_id = Column(
Integer, Integer,