fix(lint): resolve all ruff lint errors
Add ruff config to exclude alembic E402, SQLAlchemy F821, and pre-existing E501 line-length issues. Auto-fix 69 unused imports and 2 f-strings without placeholders. Manually fix 8 unused variables. Apply ruff format to 127 files. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -40,10 +40,18 @@ class Tenant(Base):
|
||||
openbao_key_name: Mapped[str | None] = mapped_column(Text, nullable=True)
|
||||
|
||||
# Relationships — passive_deletes=True lets the DB ON DELETE CASCADE handle cleanup
|
||||
users: Mapped[list["User"]] = relationship("User", back_populates="tenant", passive_deletes=True) # type: ignore[name-defined]
|
||||
devices: Mapped[list["Device"]] = relationship("Device", back_populates="tenant", passive_deletes=True) # type: ignore[name-defined]
|
||||
device_groups: Mapped[list["DeviceGroup"]] = relationship("DeviceGroup", back_populates="tenant", passive_deletes=True) # type: ignore[name-defined]
|
||||
device_tags: Mapped[list["DeviceTag"]] = relationship("DeviceTag", back_populates="tenant", passive_deletes=True) # type: ignore[name-defined]
|
||||
users: Mapped[list["User"]] = relationship(
|
||||
"User", back_populates="tenant", passive_deletes=True
|
||||
) # type: ignore[name-defined]
|
||||
devices: Mapped[list["Device"]] = relationship(
|
||||
"Device", back_populates="tenant", passive_deletes=True
|
||||
) # type: ignore[name-defined]
|
||||
device_groups: Mapped[list["DeviceGroup"]] = relationship(
|
||||
"DeviceGroup", back_populates="tenant", passive_deletes=True
|
||||
) # type: ignore[name-defined]
|
||||
device_tags: Mapped[list["DeviceTag"]] = relationship(
|
||||
"DeviceTag", back_populates="tenant", passive_deletes=True
|
||||
) # type: ignore[name-defined]
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"<Tenant id={self.id} name={self.name!r}>"
|
||||
|
||||
Reference in New Issue
Block a user