Skip to content

Commit

Permalink
enable RUF and UP (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
fpgmaas authored Jul 17, 2024
1 parent 46b84cc commit d54bc96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion chispa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
sys.path.append(os.path.join(spark_home, "python"))
py4j_src_zip = glob(os.path.join(spark_home, "python", "lib", "py4j-*-src.zip"))
if len(py4j_src_zip) == 0:
raise ValueError("py4j source archive not found in %s" % os.path.join(spark_home, "python", "lib"))
raise ValueError(
"py4j source archive not found in {}".format(os.path.join(spark_home, "python", "lib"))
)
else:
py4j_src_zip = sorted(py4j_src_zip)[::-1]
sys.path.append(py4j_src_zip[0])
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@ fix = true
preview = true

[tool.ruff.lint]
select = ["E", "F", "I"]
select = ["E", "F", "I", "RUF", "UP"]
ignore = [
# Line too long
"E501",
# Mutable class attributes
"RUF012"
]

[tool.ruff.lint.flake8-type-checking]
Expand Down

0 comments on commit d54bc96

Please sign in to comment.