Files
rfd-notify/rfd_notify/models/topic.py
Dave Gallant 9ba64a3de5 Migrate to python (#265)
* Add initial python migration

* Add pylint

* Add pre-commit

* Add Dockerfile

* Add expression matching

* Use shelve to store previous matches

* Add notifications

* Calculate post age

* Update README.md
2023-02-20 23:23:29 -05:00

24 lines
514 B
Python

from .offer import Offer
class Topic:
# pylint: disable=unused-argument
# pylint: disable=too-many-arguments
def __init__(
self,
topic_id: int,
title: str,
post_time: str,
web_path: str,
offer: dict,
**kwargs,
):
self.topic_id = topic_id
self.title = title
self.post_time = post_time
self.web_path = web_path
self.offer = Offer(**offer)
def __repr__(self):
return f"Topic({self.title})"