summaryrefslogtreecommitdiffstats
path: root/activities/views
diff options
context:
space:
mode:
authorPaolo Melchiorre2022-12-05 18:38:37 +0100
committerGitHub2022-12-05 10:38:37 -0700
commita9bb4a7122df6d9d4a764de52244c6ec75789ead (patch)
tree14ba582f72ac5e3b133b3644ca03e0f027e7c2ef /activities/views
parentdd8e823d2f3ef22fcaa1e43e74f11f7e49eff9e7 (diff)
downloadtakahe-a9bb4a7122df6d9d4a764de52244c6ec75789ead.tar.gz
takahe-a9bb4a7122df6d9d4a764de52244c6ec75789ead.tar.bz2
takahe-a9bb4a7122df6d9d4a764de52244c6ec75789ead.zip
Add pyupgrade with --py310-plus in pre-commit (#103)
Diffstat (limited to 'activities/views')
-rw-r--r--activities/views/search.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/activities/views/search.py b/activities/views/search.py
index ccfc1a4..f7ab237 100644
--- a/activities/views/search.py
+++ b/activities/views/search.py
@@ -1,5 +1,3 @@
-from typing import Set
-
import httpx
from asgiref.sync import async_to_sync
from django import forms
@@ -32,7 +30,7 @@ class Search(FormView):
# Try to fetch the user by handle
query = query.lstrip("@")
- results: Set[Identity] = set()
+ results: set[Identity] = set()
if "@" in query:
username, domain = query.split("@", 1)
@@ -118,7 +116,7 @@ class Search(FormView):
if "@" in query or "://" in query:
return set()
- results: Set[Hashtag] = set()
+ results: set[Hashtag] = set()
query = query.lstrip("#")
for hashtag in Hashtag.objects.public().hashtag_or_alias(query)[:10]:
results.add(hashtag)