Skip to content

Commit 3ccdcee

Browse files
ruff fmt
1 parent 02a65f9 commit 3ccdcee

File tree

8 files changed

+6
-12
lines changed

8 files changed

+6
-12
lines changed

Diff for: Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ test:
1111
lint:
1212
poetry run black ${PROJECT_FOLDER}
1313
poetry run ruff check ${PROJECT_FOLDER}
14+
poetry run ruff format ${PROJECT_FOLDER}
1415
run: down test lint build up

Diff for: chronogram/background_workers/timecapsule_sender.py

-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ async def get_formatted_msg_content(
8181

8282

8383
async def send_timecapsule(tg_uid, sent, content, tc_id, photo, l10n: L10N):
84-
8584
if photo:
8685
photo_data = await TC.get_timecapsule_image_data(tg_uid=tg_uid, tc_id=tc_id)
8786
img = Image.frombytes(

Diff for: chronogram/database/requests.py

-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ async def add_user_if_not_exists(tg_uid: int, lang: str) -> bool:
6464

6565

6666
class TimeCapsuleDatabaseActions:
67-
6867
@staticmethod
6968
async def get_timecapsules_to_send() -> list[TimeCapsule]:
7069
async with async_session() as session:
@@ -526,7 +525,6 @@ async def process_payment(
526525

527526
async def get_stats() -> tuple[int, int, int]:
528527
async with async_session() as session:
529-
530528
total_users = (
531529
await session.execute(select(func.count(ChronogramUser.id)))
532530
).scalar_one()

Diff for: chronogram/handlers/settings/utc_picker.py

-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ async def process_utc_picker(
123123

124124

125125
async def start_utc_picker(data: UtcPickerCallback, l10n: L10N) -> InlineKeyboardMarkup:
126-
127126
keyboard = [[], [], [], [], []]
128127

129128
keyboard[0] = [

Diff for: chronogram/handlers/timecapsule/aiogram3_simplecalendar/common.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44

55
class GenericCalendar:
6-
76
def __init__(
87
self,
98
locale: str = None,
@@ -78,13 +77,13 @@ async def process_day_select(self, data, query):
7877
date = datetime(int(data.year), int(data.month), int(data.day))
7978
if self.min_date and self.min_date > date:
8079
await query.answer(
81-
f'The date have to be later {self.min_date.strftime("%d/%m/%Y")}',
80+
f"The date have to be later {self.min_date.strftime('%d/%m/%Y')}",
8281
show_alert=self.show_alerts,
8382
)
8483
return False, None
8584
elif self.max_date and self.max_date < date:
8685
await query.answer(
87-
f'The date have to be before {self.max_date.strftime("%d/%m/%Y")}',
86+
f"The date have to be before {self.max_date.strftime('%d/%m/%Y')}",
8887
show_alert=self.show_alerts,
8988
)
9089
return False, None

Diff for: chronogram/handlers/timecapsule/timepicker_bigstep.py

-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ def replace_and_pack(self, action: TimepickerActions) -> str:
3535
async def start_timepicker(
3636
data: TimepickerCallback, l10n: L10N
3737
) -> InlineKeyboardMarkup:
38-
3938
keyboard = [[], [], [], []]
4039

4140
keyboard[0] = [
@@ -124,7 +123,6 @@ def process_time_change(
124123
async def process_selection(
125124
callback: CallbackQuery, data: TimepickerCallback, l10n: L10N
126125
):
127-
128126
selected, selected_time, canceled = (
129127
False,
130128
time(hour=data.hour, minute=data.minute),

Diff for: chronogram/middlewares/l10n_data/en.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
},
6767
"/refund": {
6868
"no_refunds": "Refunds are not available with this bot",
69-
"usage": "<b>Refund usage</b>\n\n" "<code>/refund *ID of transaction*</code>",
69+
"usage": "<b>Refund usage</b>\n\n<code>/refund *ID of transaction*</code>",
7070
"invalid_tid": "Invalid transaction ID",
7171
"non_refund": "subscriptions are non refundable",
7272
"24passed": "This payment was made more than 24 hour ago",

Diff for: chronogram/middlewares/l10n_data/ru.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
},
6767
"/refund": {
6868
"no_refunds": "Все платежи этому боту не подлежат возврату.",
69-
"usage": "<b>Refund usage</b>\n\n" "<code>/refund *ID of transaction*</code>",
69+
"usage": "<b>Refund usage</b>\n\n<code>/refund *ID of transaction*</code>",
7070
"invalid_tid": "Invalid transaction ID",
7171
"non_refund": "subscriptions are non refundable",
7272
"24passed": "This payment was made more than 24 hour ago",
@@ -159,7 +159,7 @@
159159
"buy_prolong": "Купить\\Продлить",
160160
},
161161
"/subscription": {
162-
"init_subscribed": "<b>Подписка</b>" "\n\nВаша подписка истечёт <b>{}</b>\n\n",
162+
"init_subscribed": "<b>Подписка</b>\n\nВаша подписка истечёт <b>{}</b>\n\n",
163163
"init_standard": "<b>Подписка</b>\n\n",
164164
"info": "You can subscribe to ChronoPremium for 150⭐️(a month) to get 10MB available "
165165
"storage for your time "

0 commit comments

Comments
 (0)