mirror of
https://github.com/Xevion/leetcode.git
synced 2025-12-06 15:15:29 -06:00
Add URL question links to ID/Title, url property
This commit is contained in:
@@ -39,6 +39,13 @@ class Question(BaseModel):
|
||||
difficulty: str
|
||||
tags: List[Tag]
|
||||
|
||||
@property
|
||||
def url(self) -> str:
|
||||
"""
|
||||
Gets the URL to the question.
|
||||
"""
|
||||
return f"https://leetcode.com/problems/{self.slug}"
|
||||
|
||||
|
||||
class QuestionDatabase(object):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user