This is an automated email from the ASF dual-hosted git repository.
potiuk 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 6a6455ad1c Correctly pass a type to attrs.has() (#30677)
6a6455ad1c is described below
commit 6a6455ad1c2d76eaf9c60814c2b0a0141ad29da0
Author: Tzu-ping Chung <[email protected]>
AuthorDate: Mon Apr 17 21:56:53 2023 +0800
Correctly pass a type to attrs.has() (#30677)
---
airflow/providers/openlineage/utils/utils.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/airflow/providers/openlineage/utils/utils.py
b/airflow/providers/openlineage/utils/utils.py
index 0ed77fc608..5ad3eb4c4c 100644
--- a/airflow/providers/openlineage/utils/utils.py
+++ b/airflow/providers/openlineage/utils/utils.py
@@ -341,10 +341,8 @@ class OpenLineageRedactor(SecretsMasker):
try:
if name and should_hide_value_for_key(name):
return self._redact_all(item, depth, max_depth)
- # TODO: Those type: ignores here should be reviewed and fixed
- # See: https://github.com/apache/airflow/issues/30673
- if attrs.has(item): # type: ignore
- for dict_key, subval in attrs.asdict(item,
recurse=False).items(): # type: ignore
+ if attrs.has(type(item)):
+ for dict_key, subval in attrs.asdict(item,
recurse=False).items():
if _is_name_redactable(dict_key, item):
setattr(
item,