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: enable RUF ruleset for ruff #2677

Merged
merged 4 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion python/deltalake/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion python/deltalake/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
)

try:
import pandas as pd # noqa: F811
import pandas as pd
except ModuleNotFoundError:
_has_pandas = False
else:
Expand Down
4 changes: 3 additions & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ select = [
# pyflakes
"F",
# isort
"I"
"I",
# ruff-specific rules
"RUF"
]
ignore = ["E501"]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading