Skip to content

Commit 11eca37

Browse files
committed
style: update ruff to 0.4.4
1 parent 4541307 commit 11eca37

5 files changed

Lines changed: 66 additions & 65 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repos:
1111
- id: check-yaml
1212

1313
- repo: https://github.com/astral-sh/ruff-pre-commit
14-
rev: v0.2.0
14+
rev: v0.4.4
1515
hooks:
1616
- id: ruff-format
1717
- id: ruff

compiler/errors/compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def start():
138138
content = f.read()
139139

140140
with Path(f"{DEST}/all.py").open("w", encoding="utf-8") as f:
141-
f.write(re.sub("{count}", str(count), content))
141+
f.write(re.sub("{count}", str(count), content)) # noqa: RUF027
142142

143143

144144
if __name__ == "__main__":

hydrogram/dispatcher.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ async def edited_message_parser(update, users, chats):
103103

104104
return (parsed, EditedMessageHandler)
105105

106-
async def deleted_messages_parser(update, users, chats):
106+
def deleted_messages_parser(update, users, chats):
107107
return (
108108
utils.parse_deleted_messages(self.client, update),
109109
DeletedMessagesHandler,
@@ -115,37 +115,37 @@ async def callback_query_parser(update, users, chats):
115115
CallbackQueryHandler,
116116
)
117117

118-
async def user_status_parser(update, users, chats):
118+
def user_status_parser(update, users, chats):
119119
return (
120120
hydrogram.types.User._parse_user_status(self.client, update),
121121
UserStatusHandler,
122122
)
123123

124-
async def inline_query_parser(update, users, chats):
124+
def inline_query_parser(update, users, chats):
125125
return (
126126
hydrogram.types.InlineQuery._parse(self.client, update, users),
127127
InlineQueryHandler,
128128
)
129129

130-
async def poll_parser(update, users, chats):
130+
def poll_parser(update, users, chats):
131131
return (
132132
hydrogram.types.Poll._parse_update(self.client, update),
133133
PollHandler,
134134
)
135135

136-
async def chosen_inline_result_parser(update, users, chats):
136+
def chosen_inline_result_parser(update, users, chats):
137137
return (
138138
hydrogram.types.ChosenInlineResult._parse(self.client, update, users),
139139
ChosenInlineResultHandler,
140140
)
141141

142-
async def chat_member_updated_parser(update, users, chats):
142+
def chat_member_updated_parser(update, users, chats):
143143
return (
144144
hydrogram.types.ChatMemberUpdated._parse(self.client, update, users, chats),
145145
ChatMemberUpdatedHandler,
146146
)
147147

148-
async def chat_join_request_parser(update, users, chats):
148+
def chat_join_request_parser(update, users, chats):
149149
return (
150150
hydrogram.types.ChatJoinRequest._parse(self.client, update, users, chats),
151151
ChatJoinRequestHandler,

0 commit comments

Comments
 (0)