This is an automated email from the ASF dual-hosted git repository.
zhongjiajie pushed a commit to branch main
in repository
https://gitbox.apache.org/repos/asf/dolphinscheduler-sdk-python.git
The following commit(s) were added to refs/heads/main by this push:
new 5470f3e Bump ruff to fix ci (#142)
5470f3e is described below
commit 5470f3eb49c6b1fc6446197b9625adb6d058e4aa
Author: Jay Chung <[email protected]>
AuthorDate: Thu Mar 7 09:52:35 2024 +0800
Bump ruff to fix ci (#142)
---
.ruff.toml | 10 +++++-----
setup.cfg | 2 +-
src/pydolphinscheduler/core/task.py | 6 ++----
3 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/.ruff.toml b/.ruff.toml
index 7ddd14b..ea10c8b 100644
--- a/.ruff.toml
+++ b/.ruff.toml
@@ -5,13 +5,13 @@ target-version = "py38"
# max-line-length = 110
line-length = 110
-extend-select = [
+lint.extend-select = [
"I", # isort
"D", # pydocstyle
"UP", # pyupgrade
]
-ignore = [
+lint.ignore = [
# D107: Missing docstring in __init__
"D107",
# D105: Missing docstring in magic method
@@ -38,15 +38,15 @@ exclude = [
"htmlcov"
]
-[extend-per-file-ignores]
+[lint.extend-per-file-ignores]
"*/pydolphinscheduler/side/__init__.py" = ["F401"]
"*/pydolphinscheduler/tasks/__init__.py" = ["F401"]
-[isort]
+[lint.isort]
# Mark sqlfluff, test and it's plugins as known first party
known-first-party = [
"pydolphinscheduler",
]
-[pydocstyle]
+[lint.pydocstyle]
convention = "google"
\ No newline at end of file
diff --git a/setup.cfg b/setup.cfg
index ba6d5e9..50a153f 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -102,7 +102,7 @@ test =
docker>=5.0.3
style =
black>=22.8
- ruff>=0.1
+ ruff>=0.3
doc =
sphinx>=4.3
sphinx_rtd_theme>=1.0
diff --git a/src/pydolphinscheduler/core/task.py
b/src/pydolphinscheduler/core/task.py
index a8e5fac..cc89d2f 100644
--- a/src/pydolphinscheduler/core/task.py
+++ b/src/pydolphinscheduler/core/task.py
@@ -366,10 +366,8 @@ class Task(Base):
index = _ext_attr.rfind(Symbol.POINT)
if index != -1:
raise ValueError(
- "This task does not support files with suffix {},
only supports {}".format(
- _ext_attr[index:],
- Symbol.COMMA.join(str(suf) for suf in
self.ext),
- )
+ f"This task does not support files with suffix
{_ext_attr[index:]},"
+ f"only supports {Symbol.COMMA.join(str(suf) for
suf in self.ext)}"
)
setattr(self, self.ext_attr.lstrip(Symbol.UNDERLINE),
_ext_attr)