Skip to content

Commit

Permalink
lint code
Browse files Browse the repository at this point in the history
  • Loading branch information
Apollosuny committed Nov 30, 2024
1 parent a99036a commit ab33dda
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ repos:
rev: 23.9.1
hooks:
- id: black
args: ['--line-length', '79']

- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
Expand Down
8 changes: 6 additions & 2 deletions plugins/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,17 @@ class Order(base):
updatedAt = Column(DateTime, default=func.now(), onupdate=func.now())

# relationships
customerId = Column(Integer, ForeignKey("customer.customerId"), nullable=False)
customerId = Column(
Integer, ForeignKey("customer.customerId"), nullable=False
)
customer = relationship("Customer", back_populates="order")


class OrderDetail(base):
__tablename__ = "order_detail"
__table_args__ = (PrimaryKeyConstraint("orderId", "sku", name="orderId_sku"),)
__table_args__ = (
PrimaryKeyConstraint("orderId", "sku", name="orderId_sku"),
)

orderId = Column(String, ForeignKey("order.orderId"), nullable=False)
sku = Column(String, ForeignKey("product.sku"), nullable=False)
Expand Down

0 comments on commit ab33dda

Please sign in to comment.