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

jscheffl pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new b9faa656dfb Fix: Removed the stray 's' and added a unit test to lock 
the formatting. (#63712)
b9faa656dfb is described below

commit b9faa656dfb0a576ed5d13a74b90731589697160
Author: Nandan <[email protected]>
AuthorDate: Thu Mar 19 03:35:39 2026 +0530

    Fix: Removed the stray 's' and added a unit test to lock the formatting. 
(#63712)
    
    * Fix FileSyntaxError string formatting
    
    * Add newsfragment for FileSyntaxError fix
    
    * Remove newsfragment per review
---
 airflow-core/src/airflow/exceptions.py                          | 2 +-
 airflow-core/tests/unit/always/test_secrets_local_filesystem.py | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/airflow-core/src/airflow/exceptions.py 
b/airflow-core/src/airflow/exceptions.py
index ebcdb47b3a2..64c4b8ee92a 100644
--- a/airflow-core/src/airflow/exceptions.py
+++ b/airflow-core/src/airflow/exceptions.py
@@ -179,7 +179,7 @@ class FileSyntaxError(NamedTuple):
     message: str
 
     def __str__(self):
-        return f"{self.message}. Line number: s{str(self.line_no)},"
+        return f"{self.message}. Line number: {str(self.line_no)},"
 
 
 class AirflowFileParseException(AirflowException):
diff --git a/airflow-core/tests/unit/always/test_secrets_local_filesystem.py 
b/airflow-core/tests/unit/always/test_secrets_local_filesystem.py
index 833b7ae36fa..68a1b686311 100644
--- a/airflow-core/tests/unit/always/test_secrets_local_filesystem.py
+++ b/airflow-core/tests/unit/always/test_secrets_local_filesystem.py
@@ -29,6 +29,7 @@ from airflow.exceptions import (
     AirflowException,
     AirflowFileParseException,
     ConnectionNotUnique,
+    FileSyntaxError,
     VariableNotUnique,
 )
 from airflow.models import Variable
@@ -87,6 +88,12 @@ class TestFileParsers:
                 local_filesystem.load_variables("a.yaml")
 
 
+class TestFileSyntaxError:
+    def test_str(self):
+        error = FileSyntaxError(line_no=10, message="Invalid line format")
+        assert str(error) == "Invalid line format. Line number: 10,"
+
+
 class TestLoadVariables:
     @pytest.mark.parametrize(
         ("file_content", "expected_variables"),

Reply via email to