mirror of
https://github.com/apache/superset.git
synced 2026-04-20 08:34:37 +00:00
chore: enforce more ruff rules (#31447)
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
This commit is contained in:
committed by
GitHub
parent
9da65d6bfd
commit
e51b95ffa8
@@ -68,7 +68,7 @@ def session_with_schema(session: Session) -> Generator[Session, None, None]:
|
||||
engine = session.get_bind()
|
||||
SqlaTable.metadata.create_all(engine) # pylint: disable=no-member
|
||||
|
||||
yield session
|
||||
return session
|
||||
|
||||
|
||||
def test_import_chart(mocker: MockerFixture, session_with_schema: Session) -> None:
|
||||
@@ -158,7 +158,7 @@ def test_filter_chart_annotations(session: Session) -> None:
|
||||
annotation_layers = params["annotation_layers"]
|
||||
|
||||
assert len(annotation_layers) == 1
|
||||
assert all([al["annotationType"] == "FORMULA" for al in annotation_layers])
|
||||
assert all([al["annotationType"] == "FORMULA" for al in annotation_layers]) # noqa: C419
|
||||
|
||||
|
||||
def test_import_existing_chart_without_permission(
|
||||
@@ -186,7 +186,7 @@ def test_import_existing_chart_without_permission(
|
||||
import_chart(chart_config, overwrite=True)
|
||||
assert (
|
||||
str(excinfo.value)
|
||||
== "A chart already exists and user doesn't have permissions to overwrite it"
|
||||
== "A chart already exists and user doesn't have permissions to overwrite it" # noqa: E501
|
||||
)
|
||||
|
||||
# Assert that the can write to chart was checked
|
||||
|
||||
Reference in New Issue
Block a user