diff --git a/python/deltalake/table.py b/python/deltalake/table.py index 14ffd3f6f9..a85a31bf0b 100644 --- a/python/deltalake/table.py +++ b/python/deltalake/table.py @@ -49,7 +49,7 @@ from deltalake.schema import Schema as DeltaSchema try: - import pandas as pd # noqa: F811 + import pandas as pd except ModuleNotFoundError: _has_pandas = False else: diff --git a/python/deltalake/writer.py b/python/deltalake/writer.py index b5b26cf8f5..1718b5764b 100644 --- a/python/deltalake/writer.py +++ b/python/deltalake/writer.py @@ -61,7 +61,7 @@ ) try: - import pandas as pd # noqa: F811 + import pandas as pd except ModuleNotFoundError: _has_pandas = False else: diff --git a/python/pyproject.toml b/python/pyproject.toml index dd69669335..c02b341dba 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -83,7 +83,9 @@ select = [ # pyflakes "F", # isort - "I" + "I", + # ruff-specific rules + "RUF" ] ignore = ["E501"] diff --git a/python/tests/pyspark_integration/test_write_to_pyspark.py b/python/tests/pyspark_integration/test_write_to_pyspark.py index 3e4bb9d7f0..81cda71883 100644 --- a/python/tests/pyspark_integration/test_write_to_pyspark.py +++ b/python/tests/pyspark_integration/test_write_to_pyspark.py @@ -106,7 +106,7 @@ def test_checks_min_writer_version(tmp_path: pathlib.Path): ) # Add a constraint upgrades the minWriterProtocol - spark.sql(f"ALTER TABLE delta.`{str(tmp_path)}` ADD CONSTRAINT x CHECK (c1 > 2)") + spark.sql(f"ALTER TABLE delta.`{tmp_path!s}` ADD CONSTRAINT x CHECK (c1 > 2)") with pytest.raises( DeltaProtocolError, match="This table's min_writer_version is 3, but"