Skip to content

Commit

Permalink
Closes #95 - Reduced overall churn diff
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank995 committed Jan 2, 2024
1 parent ae2aece commit c11bc8e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/pydiscourse/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
Core API client module
"""

import logging
import re
import time

import logging
import requests
from datetime import timedelta, datetime

Expand Down Expand Up @@ -606,11 +606,11 @@ def delete_topic(self, topic_id, **kwargs):
"""
return self._delete(f"/t/{topic_id}", **kwargs)

def _get_topic_attachments_urls(self, slug, topic_id, **kwargs):
"""
Private function to get attachment URLs
Args:
slug:
topic_id:
Expand All @@ -634,7 +634,7 @@ def _get_topic_attachments_urls(self, slug, topic_id, **kwargs):
def get_topic_attachments_number(self, slug, topic_id, **kwargs):
"""
Retrieve the number of attachments in the post
Args:
slug:
topic_id:
Expand All @@ -648,7 +648,7 @@ def get_topic_attachments_number(self, slug, topic_id, **kwargs):
def download_topic_attachments(self, slug, topic_id, allowed_extensions=None, **kwargs):
"""
Return the body of attachments in the specified post with the associated extension
Args:
slug:
topic_id:
Expand Down Expand Up @@ -683,13 +683,13 @@ def download_topic_attachments(self, slug, topic_id, allowed_extensions=None, **
(
self._get(
url,
override_request_kwargs=request_kwargs
override_request_kwargs=request_kwargs,
),
url.split('.')[-1]
url.split('.')[-1],
)
for url in cleaned_urls
]

return objects

def post(self, topic_id, post_id, **kwargs):
Expand Down

0 comments on commit c11bc8e

Please sign in to comment.