chore: enforce more ruff rules (#31447)

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
This commit is contained in:
Maxime Beauchemin
2024-12-18 17:41:34 -08:00
committed by GitHub
parent 9da65d6bfd
commit e51b95ffa8
375 changed files with 1821 additions and 1718 deletions

View File

@@ -43,7 +43,7 @@ class BaseTestDashboardSecurity(DashboardTestCase):
self.assert200(response)
response_data = response.json
assert response_data["count"] == expected_counts
response_dashboards_url = set(
response_dashboards_url = set( # noqa: C417
map(lambda dash: dash["url"], response_data["result"])
)
expected_dashboards = expected_dashboards or []

View File

@@ -85,7 +85,7 @@ class TestDashboardDatasetSecurity(DashboardTestCase):
}
# assert
for dashboard_url, get_dashboard_response in responses_by_url.items():
for dashboard_url, get_dashboard_response in responses_by_url.items(): # noqa: B007
self.assert200(get_dashboard_response)
def test_get_dashboards__users_are_dashboards_owners(self):

View File

@@ -224,7 +224,7 @@ class TestDashboardRoleBasedSecurity(BaseTestDashboardSecurity):
assert response.status_code == 302
@pytest.mark.usefixtures("public_role_like_gamma")
def test_get_dashboard_view__public_user_with_dashboard_permission_can_not_access_draft(
def test_get_dashboard_view__public_user_with_dashboard_permission_can_not_access_draft( # noqa: E501
self,
):
# arrange