Skip to content

Commit 6e71362

Browse files
committed
feat: fix ci and lint
1 parent 6ae626b commit 6e71362

File tree

6 files changed

+16
-10
lines changed

6 files changed

+16
-10
lines changed

pybotx/models/message/markup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def __eq__(self, other: object) -> bool:
7171
raise NotImplementedError
7272

7373
# https://github.com/wemake-services/wemake-python-styleguide/issues/2172
74-
return self._buttons == other._buttons # noqa: WPS437
74+
return self._buttons == other._buttons
7575

7676
def __repr__(self) -> str:
7777
buttons = []
@@ -184,7 +184,7 @@ class BotXAPIButton(UnverifiedPayloadBaseModel):
184184

185185

186186
class BotXAPIMarkup(RootModel[List[List[BotXAPIButton]]]):
187-
def json(self) -> str: # type: ignore [override]
187+
def json(self) -> str: # type: ignore[override]
188188
clean_dict = _remove_undefined(self.model_dump())
189189
return json.dumps(clean_dict, default=to_jsonable_python, ensure_ascii=False)
190190

pybotx/models/stickers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ async def download(
2929
) -> None:
3030
bot = bot_var.get()
3131

32-
response = await bot._httpx_client.get(self.image_link) # noqa: WPS437
32+
response = await bot._httpx_client.get(self.image_link)
3333
response.raise_for_status()
3434

3535
await async_buffer.write(response.content)

scripts/docs-lint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ while IFS= read -d '' -r snippet || [[ -n "${snippet}" ]]; do
1515
done < <(grep -Pzo '(?s)(?<=```python\n).*?(?=```)' README.md);
1616

1717
mypy "${snippets_dir_path}"
18-
ruff "${snippets_dir_path}"
18+
ruff lint "${snippets_dir_path}"
1919

2020
rm -rf "${snippets_dir_path}"

tests/client/chats_api/test_chat_info_validation.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
from uuid import UUID
32

43
from pybotx.client.chats_api.chat_info import (
@@ -26,7 +25,10 @@ def test_validate_members_non_dict() -> None:
2625

2726
# - Act -
2827
# Call validate_members with a list containing a non-dict item
29-
result = BotXAPIChatInfoResult.validate_members([non_dict_member], MockValidationInfo(field_name="members")) # type: ignore[call-arg, arg-type]
28+
result = BotXAPIChatInfoResult.validate_members( # type: ignore[call-arg]
29+
[non_dict_member],
30+
MockValidationInfo(field_name="members"), # type: ignore[arg-type]
31+
)
3032

3133
# - Assert -
3234
# Verify that the non-dict item is included in the result

tests/client/chats_api/test_list_chats_validation.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ def test_validate_result_non_dict() -> None:
3131

3232
# - Act -
3333
# Call validate_result with a list containing a non-dict item
34-
result = BotXAPIListChatResponsePayload.validate_result([non_dict_result], MockValidationInfo(field_name="result")) # type: ignore[call-arg, arg-type]
34+
result = BotXAPIListChatResponsePayload.validate_result( # type: ignore[call-arg]
35+
[non_dict_result],
36+
MockValidationInfo(field_name="result"), # type: ignore[arg-type]
37+
)
3538

3639
# - Assert -
3740
# Verify that the non-dict item is included in the result

tests/models/test_incoming_message_validation.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
from pybotx.models.message.incoming_message import BotAPIIncomingMessage
32
from pybotx.models.message.mentions import BotAPIMention
43

@@ -25,7 +24,8 @@ def test_validate_items_dict() -> None:
2524
# - Act -
2625
# Call validate_items with a list containing a dict item
2726
result = BotAPIIncomingMessage.validate_items(
28-
[entity_dict], MockValidationInfo(field_name="entities") # type: ignore[call-arg, arg-type]
27+
[entity_dict],
28+
MockValidationInfo(field_name="entities"), # type: ignore[call-arg, arg-type]
2929
)
3030

3131
# - Assert -
@@ -43,7 +43,8 @@ def test_validate_items_non_dict() -> None:
4343
# Call validate_items with a list containing a non-dict item
4444
# The non-dict item will not be processed and not added to the result list
4545
result = BotAPIIncomingMessage.validate_items(
46-
[non_dict_entity], MockValidationInfo(field_name="entities") # type: ignore[call-arg, arg-type]
46+
[non_dict_entity],
47+
MockValidationInfo(field_name="entities"), # type: ignore[call-arg, arg-type]
4748
)
4849

4950
# - Assert -

0 commit comments

Comments
 (0)