This is an automated email from the ASF dual-hosted git repository.
jasonliu 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 e1cfcac4965 scripts(python): fix spelling (#48751)
e1cfcac4965 is described below
commit e1cfcac496568c2521a4e87689faf63bf59dc63e
Author: John Bampton <[email protected]>
AuthorDate: Fri Apr 4 11:42:59 2025 +1000
scripts(python): fix spelling (#48751)
---
scripts/ci/pre_commit/check_deferrable_default.py | 4 ++--
scripts/ci/pre_commit/check_integrations_list.py | 2 +-
scripts/ci/pre_commit/check_lazy_logging.py | 4 ++--
scripts/in_container/run_generate_constraints.py | 6 +++---
scripts/in_container/run_resource_check.py | 8 ++++----
5 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/scripts/ci/pre_commit/check_deferrable_default.py
b/scripts/ci/pre_commit/check_deferrable_default.py
index 26753d68130..a49aed4a6ed 100755
--- a/scripts/ci/pre_commit/check_deferrable_default.py
+++ b/scripts/ci/pre_commit/check_deferrable_default.py
@@ -88,11 +88,11 @@ def iter_check_deferrable_default_errors(module_filename:
str) -> Iterator[str]:
# We check the module using the ast once and then fix it through cst if
needed.
# The primary reason we don't do it all through cst is performance.
if visitor.error_linenos:
- _fix_invalide_deferrable_default_value(module_filename)
+ _fix_invalid_deferrable_default_value(module_filename)
yield from (f"{module_filename}:{lineno}" for lineno in
visitor.error_linenos)
-def _fix_invalide_deferrable_default_value(module_filename: str) -> None:
+def _fix_invalid_deferrable_default_value(module_filename: str) -> None:
context = CodemodContext(filename=module_filename)
AddImportsVisitor.add_needed_import(context, "airflow.configuration",
"conf")
transformer = DefaultDeferrableTransformer()
diff --git a/scripts/ci/pre_commit/check_integrations_list.py
b/scripts/ci/pre_commit/check_integrations_list.py
index ad6ebf77b9d..a525063806f 100755
--- a/scripts/ci/pre_commit/check_integrations_list.py
+++ b/scripts/ci/pre_commit/check_integrations_list.py
@@ -156,7 +156,7 @@ def _get_breeze_description(parsed_compose: dict[str, Any],
label_key: str = "br
if _label_name == label_key:
image_label_map[_img_name] = label
except KeyError:
- # service has no 'lables' entry
+ # service has no 'labels' entry
continue
return image_label_map
diff --git a/scripts/ci/pre_commit/check_lazy_logging.py
b/scripts/ci/pre_commit/check_lazy_logging.py
index d8d0f60120c..103af2372a7 100755
--- a/scripts/ci/pre_commit/check_lazy_logging.py
+++ b/scripts/ci/pre_commit/check_lazy_logging.py
@@ -28,7 +28,7 @@ from rich.console import Console
console = Console(color_system="standard", width=200)
-LOGGIN_MATCHER = re.compile(r'^log.?[a-z]*\.[a-z]*\(f.*["\']')
+LOGGING_MATCHER = re.compile(r'^log.?[a-z]*\.[a-z]*\(f.*["\']')
SELF_LOG_MATCHER = re.compile(r'^self\.log\.[a-z]*\(f.*["\']')
@@ -48,7 +48,7 @@ class LogFinder(astor.TreeWalk):
or (self.cur_node.func.attr in ["log", "debug", "warning", "info",
"error", "critical"])
):
line = astor.to_source(self.cur_node, add_line_information=True)
- if LOGGIN_MATCHER.match(line) or SELF_LOG_MATCHER.match(line):
+ if LOGGING_MATCHER.match(line) or SELF_LOG_MATCHER.match(line):
if not self.module_printed:
self.module_printed = True
console.print(f"[red]Error:[/] {self.name}")
diff --git a/scripts/in_container/run_generate_constraints.py
b/scripts/in_container/run_generate_constraints.py
index 48e712acf41..c8160774215 100755
--- a/scripts/in_container/run_generate_constraints.py
+++ b/scripts/in_container/run_generate_constraints.py
@@ -335,10 +335,10 @@ def generate_constraints_pypi_providers(config_params:
ConfigParams) -> None:
packages_to_install.append(f"{provider_package}=={version}")
else:
console.print("[yellow]NOK. Skipping.")
- find_airflow_distibutions = AIRFLOW_DIST_PATH.glob("apache_airflow-*.whl")
+ find_airflow_distributions = AIRFLOW_DIST_PATH.glob("apache_airflow-*.whl")
airflow_install = "."
- if find_airflow_distibutions:
- airflow_install = next(find_airflow_distibutions).as_posix()
+ if find_airflow_distributions:
+ airflow_install = next(find_airflow_distributions).as_posix()
airflow_core_install = "./airflow-core[all]"
find_airflow_core_distributions =
AIRFLOW_DIST_PATH.glob("apache_airflow_core-*.whl")
if find_airflow_core_distributions:
diff --git a/scripts/in_container/run_resource_check.py
b/scripts/in_container/run_resource_check.py
index 5587c42d1b4..6595d1fee8e 100644
--- a/scripts/in_container/run_resource_check.py
+++ b/scripts/in_container/run_resource_check.py
@@ -43,7 +43,7 @@ def get_size(bytes):
return value_gb
-def resoure_check():
+def resource_check():
"""
Use gsutil to get resources in bytes for memory and disk
"""
@@ -71,8 +71,8 @@ def resoure_check():
return resources
-def resoure_validate():
- resources = resoure_check()
+def resource_validate():
+ resources = resource_check()
warning_resources = False
check = "OK"
@@ -101,4 +101,4 @@ def resoure_validate():
if __name__ == "__main__":
- resoure_validate()
+ resource_validate()