Skip to content

Commit 1739e05

Browse files
Fix D105 for Apache Hive Provider (#38042)
* Fix D105 for Apache Hive Provider * Fix D105 for Apache Hive Provider
1 parent f7a0eaa commit 1739e05

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

airflow/providers/apache/hive/hooks/hive.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,11 +518,13 @@ def __init__(self, metastore_conn_id: str = default_conn_name) -> None:
518518
def __getstate__(self) -> dict[str, Any]:
519519
# This is for pickling to work despite the thrift hive client not
520520
# being picklable
521+
"""Serialize object and omit non-serializable attributes."""
521522
state = dict(self.__dict__)
522523
del state["metastore"]
523524
return state
524525

525526
def __setstate__(self, d: dict[str, Any]) -> None:
527+
"""Deserialize object and restore non-serializable attributes."""
526528
self.__dict__.update(d)
527529
self.__dict__["metastore"] = self.get_metastore_client()
528530

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1457,7 +1457,6 @@ combine-as-imports = true
14571457
"airflow/utils/trigger_rule.py" = ["D105"]
14581458
"airflow/utils/types.py" = ["D105"]
14591459
"airflow/utils/weight_rule.py" = ["D105"]
1460-
"airflow/providers/apache/hive/hooks/hive.py" = ["D105"]
14611460
"airflow/providers/cncf/kubernetes/secret.py" = ["D105"]
14621461
"airflow/providers/cncf/kubernetes/utils/delete_from.py" = ["D105"]
14631462
"airflow/providers/databricks/hooks/databricks.py" = ["D105"]

0 commit comments

Comments
 (0)