This is an automated email from the ASF dual-hosted git repository.
kaxilnaik 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 1db21f8524c Remove redundant `airflow/utils/empty_set.py` (#45688)
1db21f8524c is described below
commit 1db21f8524cdb1d6140a0eda573e31b93ad325f8
Author: Kaxil Naik <[email protected]>
AuthorDate: Wed Jan 15 23:56:11 2025 +0530
Remove redundant `airflow/utils/empty_set.py` (#45688)
This is now no longer needed as we removed `set` function in this file in
https://github.com/apache/airflow/pull/43530
---
airflow/configuration.py | 5 +----
airflow/utils/empty_set.py | 31 -------------------------------
scripts/cov/core_coverage.py | 1 -
3 files changed, 1 insertion(+), 36 deletions(-)
diff --git a/airflow/configuration.py b/airflow/configuration.py
index 1ea89484831..cb0cb5af73a 100644
--- a/airflow/configuration.py
+++ b/airflow/configuration.py
@@ -48,7 +48,6 @@ from typing_extensions import overload
from airflow.exceptions import AirflowConfigException
from airflow.secrets import DEFAULT_SECRETS_SEARCH_PATH
from airflow.utils import yaml
-from airflow.utils.empty_set import _get_empty_set_for_configuration
from airflow.utils.module_loading import import_string
from airflow.utils.providers_configuration_loader import
providers_configuration_loaded
from airflow.utils.weight_rule import WeightRule
@@ -304,9 +303,7 @@ class AirflowConfigParser(ConfigParser):
@functools.cached_property
def sensitive_config_values(self) -> set[tuple[str, str]]:
if self.configuration_description is None:
- return (
- _get_empty_set_for_configuration()
- ) # we can't use set() here because set is defined below #
¯\_(ツ)_/¯
+ return set()
flattened = {
(s, k): item
for s, s_c in self.configuration_description.items()
diff --git a/airflow/utils/empty_set.py b/airflow/utils/empty_set.py
deleted file mode 100644
index eb084f9f17e..00000000000
--- a/airflow/utils/empty_set.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-from __future__ import annotations
-
-
-def _get_empty_set_for_configuration() -> set[tuple[str, str]]:
- """
- Retrieve an empty_set_for_configuration.
-
- This method is only needed because configuration module has a deprecated
method called set, and it
- confuses mypy. This method will be removed when we remove the deprecated
method.
-
- :meta private:
- :return: empty set
- """
- return set()
diff --git a/scripts/cov/core_coverage.py b/scripts/cov/core_coverage.py
index 2d8ac091c6e..3f64167d3df 100644
--- a/scripts/cov/core_coverage.py
+++ b/scripts/cov/core_coverage.py
@@ -114,7 +114,6 @@ files_not_fully_covered = [
"airflow/utils/dot_renderer.py",
"airflow/utils/edgemodifier.py",
"airflow/utils/email.py",
- "airflow/utils/empty_set.py",
"airflow/utils/entry_points.py",
"airflow/utils/file.py",
"airflow/utils/hashlib_wrapper.py",