Skip to content

Commit 34c0f1c

Browse files
author
Oleksandr Bazarnov
committed
added a new line for formatted message
1 parent 96ae2dc commit 34c0f1c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

airbyte_cdk/sources/declarative/models/base_model_with_deprecations.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
# WHEN DEPRECATED FIELDS ARE ACCESSED
55

66
import warnings
7+
8+
# ignore the SyntaxWarning in the Airbyte log messages, during the string evaluation
9+
warnings.filterwarnings("ignore", category=SyntaxWarning)
10+
711
from typing import Any, List
812

913
from pydantic.v1 import BaseModel
@@ -12,10 +16,8 @@
1216

1317
# format the warning message
1418
warnings.formatwarning = (
15-
lambda message, category, *args, **kwargs: f"{category.__name__}: {message}"
19+
lambda message, category, *args, **kwargs: f"{category.__name__}: {message}\n"
1620
)
17-
# ignore the SyntaxWarning in the Airbyte log messages, during the string evaluation
18-
warnings.filterwarnings("ignore", category=SyntaxWarning)
1921

2022

2123
FIELDS_TAG = "__fields__"

0 commit comments

Comments
 (0)