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

jscheffl pushed a commit to branch v3-2-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-2-test by this push:
     new e31a63d6102 [v3-2-test] Prevent splitting by OS path separator 
(#67038) (#67042)
e31a63d6102 is described below

commit e31a63d6102cd68268f707283a8e8d2d79d0d019
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sat May 16 23:16:33 2026 +0200

    [v3-2-test] Prevent splitting by OS path separator (#67038) (#67042)
    
    (cherry picked from commit 3a27d600f930cd3d929bc20d4a3907235a9ee0dc)
    
    Co-authored-by: Jens Scheffler <[email protected]>
---
 dev/breeze/src/airflow_breeze/commands/setup_commands.py | 2 +-
 pyproject.toml                                           | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/dev/breeze/src/airflow_breeze/commands/setup_commands.py 
b/dev/breeze/src/airflow_breeze/commands/setup_commands.py
index 6392fe15abc..7a01bbda7cb 100644
--- a/dev/breeze/src/airflow_breeze/commands/setup_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/setup_commands.py
@@ -116,7 +116,7 @@ def autocomplete(force: bool):
     """
     # Determine if the shell is bash/zsh/powershell. It helps to build the 
autocomplete path
     detected_shell = os.environ.get("SHELL")
-    detected_shell = None if detected_shell is None else 
detected_shell.split(os.sep)[-1]
+    detected_shell = None if detected_shell is None else 
Path(detected_shell).name
     if detected_shell not in ["bash", "zsh", "fish"]:
         console_print(f"\n[error] The shell {detected_shell} is not supported 
for autocomplete![/]\n")
         sys.exit(1)
diff --git a/pyproject.toml b/pyproject.toml
index ab03b0e2b6c..455c2b0666e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -654,6 +654,7 @@ extend-select = [
     "RET507", # Unnecessary {branch} after continue statement
     "RET508", # Unnecessary {branch} after break statement
     "SIM105", # Use contextlib.suppress({exception}) instead of try-except-pass
+    "PTH206", # Checks for uses of .split(os.sep)
 ]
 ignore = [
     "D100", # Unwanted; Docstring at the top of every file.

Reply via email to