We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a1ba14 commit f8f52c5Copy full SHA for f8f52c5
src/models/europython.py
@@ -91,7 +91,7 @@ def extract_twitter_url(text: str) -> str:
91
return twitter_url.split("?")[0]
92
93
@staticmethod
94
- def extract_mastodon_url(text: str) -> str:
+ def extract_mastodon_url(text: str) -> None | str:
95
"""
96
Normalize Mastodon handle or URL to the format: https://<instance>/@<username>
97
@@ -105,7 +105,7 @@ def extract_mastodon_url(text: str) -> str:
105
elif len(parts) == 2: # username@instance
106
username, instance = parts
107
else:
108
- raise ValueError("Invalid Mastodon handle format")
+ return None
109
return f"https://{instance}/@{username}"
110
111
# Handle full URLs
0 commit comments