Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update ruff to 0.0.261 #999

Merged
merged 4 commits into from
Apr 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix new rules
  • Loading branch information
onerandomusername committed Apr 6, 2023
commit c13db83ebfd18735cba1315df53c0f63d561b0ac
2 changes: 1 addition & 1 deletion disnake/ext/commands/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ async def send_help(self, *args: Any) -> Any:
return None

try:
entity.qualified_name
entity.qualified_name # noqa: B018
except AttributeError:
# if we're here then it's not a cog, group, or command.
return None
shiftinv marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,9 @@ ignore = [
# we are not using noqa in the example files themselves
"examples/*.py" = [
"B008", # do not perform function calls in argument defaults, this is how most commands work
"T201", # print found, printing is okay in examples
"PT", # this is not a module of pytest tests
"S311", # pseudo-random generators aren't suitable for cryptographic purposes
"T201", # print found, printing is okay in examples
]
"examples/basic_voice.py" = ["S104"] # possible binding to all interfaces
"examples/views/tic_tac_toe.py" = ["E741"] # ambigious variable name: `O`
Expand Down
2 changes: 1 addition & 1 deletion tests/test_embeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,4 +479,4 @@ def test_emptyembed() -> None:

# make sure unknown module attrs continue to raise
with pytest.raises(AttributeError):
embeds.this_does_not_exist # type: ignore
embeds.this_does_not_exist # type: ignore # noqa: B018
shiftinv marked this conversation as resolved.
Show resolved Hide resolved
18 changes: 9 additions & 9 deletions tests/ui/test_action_row.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ def test_add_button(self, index) -> None:
assert list(r.children) == [button1, new_button, button2]

if TYPE_CHECKING:
ActionRow().add_button
ActionRow.with_message_components().add_button
ActionRow().add_button # noqa: B018
ActionRow.with_message_components().add_button # noqa: B018
# should not work
ActionRow.with_modal_components().add_button # type: ignore
ActionRow.with_modal_components().add_button # type: ignore # noqa: B018

def test_add_select(self) -> None:
r = ActionRow.with_message_components()
Expand All @@ -86,10 +86,10 @@ def test_add_select(self) -> None:
assert c.custom_id == "asdf"

if TYPE_CHECKING:
ActionRow().add_string_select
ActionRow.with_message_components().add_string_select
ActionRow().add_string_select # noqa: B018
ActionRow.with_message_components().add_string_select # noqa: B018
# should not work # TODO: revert when modal select support is added.
ActionRow.with_modal_components().add_select # type: ignore
ActionRow.with_modal_components().add_select # type: ignore # noqa: B018

def test_add_text_input(self) -> None:
r = ActionRow.with_modal_components()
Expand All @@ -100,10 +100,10 @@ def test_add_text_input(self) -> None:
assert c.custom_id == "asdf"

if TYPE_CHECKING:
ActionRow().add_text_input
ActionRow.with_modal_components().add_text_input
ActionRow().add_text_input # noqa: B018
ActionRow.with_modal_components().add_text_input # noqa: B018
# should not work
ActionRow.with_message_components().add_text_input # type: ignore
ActionRow.with_message_components().add_text_input # type: ignore # noqa: B018

def test_clear_items(self) -> None:
r = ActionRow(button1, button2)
Expand Down