Skip to content

Commit c201c1e

Browse files
committed
feat: Remove twitter features
1 parent 8d5e213 commit c201c1e

28 files changed

+58
-495
lines changed

.pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ disable=
1414
too-many-locals,
1515
too-many-branches, # FIXME remove when possible
1616
fixme,
17+
too-many-positional-arguments,
1718
duplicate-code, # FIXME remove when apiv1 is retired
1819

1920
load-plugins=pylint_django

requirements.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ httpx==0.24.1; python_version >= '3.7'
1818
idna==3.6; python_version >= '3.5'
1919
markdown-it-py==3.0.0; python_version >= '3.8'
2020
mdurl==0.1.2; python_version >= '3.7'
21-
oauthlib==3.2.2; python_version >= '3.6'
2221
pbr==6.0.0; python_version >= '2.6'
2322
pillow==10.3.0
2423
protobuf==3.20.3; python_version >= '3.7'
@@ -29,12 +28,10 @@ pydantic-core==2.16.3; python_version >= '3.8'
2928
pygments==2.17.2; python_version >= '3.7'
3029
pyyaml==6.0.1
3130
requests==2.31.0
32-
requests-oauthlib==1.3.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'
3331
rich==13.7.1; python_full_version >= '3.7.0'
3432
signalstickers-client==3.3.0
3533
sniffio==1.3.1; python_version >= '3.7'
3634
sqlparse==0.4.4; python_version >= '3.5'
3735
stevedore==5.2.0; python_version >= '3.8'
38-
tweepy==4.16.0
3936
typing-extensions==4.11.0; python_version >= '3.8'
4037
urllib3==2.2.1; python_version >= '3.8'

signalstickers/api/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ def test_get_all_packs(self, mocked_getpacklib):
463463

464464
# Second pack, status ONLINE: should be returned second by the API
465465
mocked_getpacklib.return_value = TestPack(
466-
"Pack title 2", "Pack author 2", b"\x61\x63\x54\x4C"
466+
"Pack title 2", "Pack author 2", b"\x61\x63\x54\x4c"
467467
)
468468

469469
Pack.objects.new(

signalstickers/api/views/contribution_view.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def put(self, request):
8484
submitter_comments=req_srl.validated_data.get(
8585
"submitter_comments", ""
8686
),
87-
api_via=api_via,
87+
api_via=api_via, # pylint: disable=possibly-used-before-assignment
8888
)
8989
except ValidationError as val_err:
9090
raise ApiException(str(val_err)) from None

signalstickers/api_v2/test/test_packs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def test_get_all_packs(self, mocked_getpacklib):
3737

3838
# Second pack, status ONLINE: should be returned second by the API
3939
mocked_getpacklib.return_value = TestPack(
40-
"Pack title 2", "Pack author 2", b"\x61\x63\x54\x4C"
40+
"Pack title 2", "Pack author 2", b"\x61\x63\x54\x4c"
4141
)
4242

4343
Pack.objects.new(

signalstickers/core/admin/pack_admin.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def _view(self, obj):
7070
("Animation", {"fields": ("animated_detected", "animated_mode", "animated")}),
7171
(
7272
"Review",
73-
{"fields": ("submitter_comments", "status", "status_comments", "tweeted")},
73+
{"fields": ("submitter_comments", "status", "status_comments")},
7474
),
7575
)
7676
autocomplete_fields = ("tags",)
@@ -107,7 +107,6 @@ def get_form(self, request, obj=None, **kwargs): # pylint: disable=arguments-di
107107
"animated": "This is the final animated status that will be displayed to users.",
108108
"submitter_comments": "Users can leave comments when the submit a pack.",
109109
"status_comments": "If needed, explain here why the pack has been refused, or almost refused.",
110-
"tweeted": "If this checkbox is checked and you uncheck it, the pack will be tweeted again. If the pack is new, check this box to prevent it from being tweeted.",
111110
}
112111
}
113112
)

signalstickers/core/management/commands/export_packs_img.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ def handle(self, *args, **options):
1919

2020
img = sticker.image_data
2121
sticker_id = int(sticker.id)
22-
if b"\x61\x63\x54\x4C" in img: # APNG acTL chunk
22+
if b"\x61\x63\x54\x4c" in img: # APNG acTL chunk
2323
ext = "png"
24-
elif img.startswith(b"\x89\x50\x4E\x47\x0D\x0A\x1A\x0A"): # PNG
24+
elif img.startswith(b"\x89\x50\x4e\x47\x0d\x0a\x1a\x0a"): # PNG
2525
ext = "png"
2626
elif img.startswith(b"\x47\x49\x46\x38\x39\x61"):
2727
ext = "gif"
@@ -32,6 +32,7 @@ def handle(self, *args, **options):
3232
ext = "webp"
3333
else:
3434
print("Unknown file type")
35+
ext = ""
3536

3637
nb_exported += 1
3738

signalstickers/core/management/commands/import_from_twitter.py

Lines changed: 0 additions & 23 deletions
This file was deleted.

signalstickers/core/management/commands/import_from_yml.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ def handle(self, *args, **options):
3131
nsfw=pack_data.get("nsfw", False),
3232
original=pack_data.get("original", False),
3333
tags=tags,
34-
tweeted=True,
3534
editorschoice=data.get("editorschoice", False),
3635
)
3736

signalstickers/core/management/commands/tweet.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)