This is an automated email from the ASF dual-hosted git repository.

jieguangzhou 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 f951ade  Fix CI compatibility with current Ruff and Packaging (#180)
f951ade is described below

commit f951ade54edb59942727dfa40b3e602a522695ef
Author: JieguangZhou <[email protected]>
AuthorDate: Wed Oct 28 16:22:35 2026 +0800

    Fix CI compatibility with current Ruff and Packaging (#180)
    
    * CI: preserve Ruff baseline rules after default expansion
    
    * Fix requirement parsing with Packaging 26.3
---
 .ruff.toml                               | 4 +++-
 src/pydolphinscheduler/utils/versions.py | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/.ruff.toml b/.ruff.toml
index 67fb9c3..c9c21a0 100644
--- a/.ruff.toml
+++ b/.ruff.toml
@@ -5,6 +5,8 @@ target-version = "py39"
 # max-line-length = 110
 line-length = 110
 
+# Keep the baseline rules explicit: Ruff 0.16 expanded its default selection.
+lint.select = ["E4", "E7", "E9", "F"]
 lint.extend-select = [
     "I",   # isort
     "D",   # pydocstyle
@@ -49,4 +51,4 @@ known-first-party = [
 ]
 
 [lint.pydocstyle]
-convention = "google"
\ No newline at end of file
+convention = "google"
diff --git a/src/pydolphinscheduler/utils/versions.py 
b/src/pydolphinscheduler/utils/versions.py
index faaf75d..755a3f3 100644
--- a/src/pydolphinscheduler/utils/versions.py
+++ b/src/pydolphinscheduler/utils/versions.py
@@ -34,7 +34,7 @@ def version_match(name: str, version: str) -> bool:
     path = Path(__file__).parent.parent.joinpath(Version.FILE_NAME)
     with path.open() as match:
         for line in match.readlines():
-            req = packaging_Requirement(line)
+            req = packaging_Requirement(line.strip())
             if req.name == name:
                 try:
                     return req.specifier.contains(version)

Reply via email to