You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ep...@apache.org on 2023/03/08 13:18:01 UTC

[airflow] 06/12: Update codespell and fix typos (#28568)

This is an automated email from the ASF dual-hosted git repository.

ephraimanierobi pushed a commit to branch v2-5-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 393bba236e100b74b88254c486a71aded27c1eec
Author: KarshVashi <41...@users.noreply.github.com>
AuthorDate: Sat Dec 24 03:24:48 2022 +0000

    Update codespell and fix typos (#28568)
    
    Co-authored-by: Kaxil Naik <ka...@gmail.com>
    (cherry picked from commit c0a7bf243461bf5e546367094e46eaab41e3831e)
---
 .codespellignorelines                                          | 2 ++
 .pre-commit-config.yaml                                        | 2 +-
 RELEASE_NOTES.rst                                              | 2 +-
 airflow/providers/sftp/hooks/sftp.py                           | 2 +-
 airflow/utils/code_utils.py                                    | 2 +-
 dev/breeze/doc/adr/0002-implement-standalone-python-command.md | 2 +-
 dev/stats/get_important_pr_candidates.py                       | 2 +-
 docs/apache-airflow/extra-packages-ref.rst                     | 2 +-
 docs/spelling_wordlist.txt                                     | 2 ++
 tests/providers/docker/operators/test_docker.py                | 8 ++++----
 10 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/.codespellignorelines b/.codespellignorelines
index d641f0aaaa..4b0179fdc9 100644
--- a/.codespellignorelines
+++ b/.codespellignorelines
@@ -1,3 +1,5 @@
             f"DELETE {source_table} FROM { ', '.join(_from_name(tbl) for tbl in stmt.froms) }"
         for frm in source_query.selectable.froms:
     roles = relationship("Role", secondary=assoc_user_role, backref="user", lazy="selectin")
+    The platform supports **C**reate, **R**ead, **U**pdate, and **D**elete operations on most resources.
+<pre><code>Code block\ndoes not\nrespect\nnewlines\n</code></pre>
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index dae2207a9a..e188a72a5d 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -283,7 +283,7 @@ repos:
          - --line-length
          - '99999'
   - repo: https://github.com/codespell-project/codespell
-    rev: v2.1.0
+    rev: v2.2.2
     hooks:
       - id: codespell
         name: Run codespell to check for common misspellings in files
diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst
index ff777a75ed..20936bb620 100644
--- a/RELEASE_NOTES.rst
+++ b/RELEASE_NOTES.rst
@@ -8069,7 +8069,7 @@ Improvement
 - [AIRFLOW-3862] Check types with mypy. (#4685)
 - [AIRFLOW-251] Add option SQL_ALCHEMY_SCHEMA parameter to specify schema for metadata (#4199)
 - [AIRFLOW-1814] Temple PythonOperator {op_args,op_kwargs} fields (#4691)
-- [AIRFLOW-3730] Standarization use of logs mechanisms (#4556)
+- [AIRFLOW-3730] Standardization use of logs mechanisms (#4556)
 - [AIRFLOW-3770] Validation of documentation on CI] (#4593)
 - [AIRFLOW-3866] Run docker-compose pull silently in CI (#4688)
 - [AIRFLOW-3685] Move licence header check (#4497)
diff --git a/airflow/providers/sftp/hooks/sftp.py b/airflow/providers/sftp/hooks/sftp.py
index 66ae50665b..7ba9a8162b 100644
--- a/airflow/providers/sftp/hooks/sftp.py
+++ b/airflow/providers/sftp/hooks/sftp.py
@@ -305,7 +305,7 @@ class SFTPHook(SSHHook):
     ) -> None:
         """
         Recursively descend, depth first, the directory tree rooted at
-        path, calling discreet callback functions for each regular file,
+        path, calling discrete callback functions for each regular file,
         directory and unknown file type.
 
         :param str path:
diff --git a/airflow/utils/code_utils.py b/airflow/utils/code_utils.py
index b5723ce7ef..7783fec0a1 100644
--- a/airflow/utils/code_utils.py
+++ b/airflow/utils/code_utils.py
@@ -56,7 +56,7 @@ def prepare_code_snippet(file_path: str, line_no: int, context_lines_count: int
     """
     Prepare code snippet with line numbers and  a specific line marked.
 
-    :param file_path: File nam
+    :param file_path: File name
     :param line_no: Line number
     :param context_lines_count: The number of lines that will be cut before and after.
     :return: str
diff --git a/dev/breeze/doc/adr/0002-implement-standalone-python-command.md b/dev/breeze/doc/adr/0002-implement-standalone-python-command.md
index b8b56d7588..8aab0db417 100644
--- a/dev/breeze/doc/adr/0002-implement-standalone-python-command.md
+++ b/dev/breeze/doc/adr/0002-implement-standalone-python-command.md
@@ -127,7 +127,7 @@ The main decision is:
 **Vast majority of both Breeze and our CI scripts should be Python-based**
 
 There are likely a number of scripts that will remain in Bash, but they should contain no sophisticated
-logic, they should not haave common code in form of libraries and only used to execute simple tasks inside
+logic, they should not have common code in form of libraries and only used to execute simple tasks inside
 Docker containers. No Bash should ever be used in the host environment.
 
 There are a few properties of Breeze/CI scripts that should be maintained though
diff --git a/dev/stats/get_important_pr_candidates.py b/dev/stats/get_important_pr_candidates.py
index 5e22966b35..28a8081e01 100755
--- a/dev/stats/get_important_pr_candidates.py
+++ b/dev/stats/get_important_pr_candidates.py
@@ -354,7 +354,7 @@ DEFAULT_TOP_PRS = 10
 )
 @click.option("--top-number", type=int, default=DEFAULT_TOP_PRS, help="The number of PRs to select")
 @click.option("--save", type=click.File("wb"), help="Save PR data to a pickle file")
-@click.option("--load", type=click.File("rb"), help="Load PR data from a file and recalcuate scores")
+@click.option("--load", type=click.File("rb"), help="Load PR data from a file and recalculate scores")
 @click.option("--verbose", is_flag="True", help="Print scoring details")
 def main(
     github_token: str,
diff --git a/docs/apache-airflow/extra-packages-ref.rst b/docs/apache-airflow/extra-packages-ref.rst
index e9f4bfb399..6315d31703 100644
--- a/docs/apache-airflow/extra-packages-ref.rst
+++ b/docs/apache-airflow/extra-packages-ref.rst
@@ -298,7 +298,7 @@ These are extras that provide support for integration with external systems via
 Bundle extras
 -------------
 
-These are extras that install one ore more extras as a bundle. Note that these extras should only be used for "development" version
+These are extras that install one or more extras as a bundle. Note that these extras should only be used for "development" version
 of Airflow - i.e. when Airflow is installed from sources. Because of the way how bundle extras are constructed they might not
 work when airflow is installed from 'PyPI`.
 
diff --git a/docs/spelling_wordlist.txt b/docs/spelling_wordlist.txt
index 3c3b855133..8bd3aa4b75 100644
--- a/docs/spelling_wordlist.txt
+++ b/docs/spelling_wordlist.txt
@@ -391,6 +391,7 @@ Decrypt
 decrypt
 decrypted
 Decrypts
+dedented
 deduplicate
 deduplication
 deepcopy
@@ -406,6 +407,7 @@ DependencyMixin
 deploymentUrl
 Deprecations
 deps
+deques
 deregister
 desc
 deserialization
diff --git a/tests/providers/docker/operators/test_docker.py b/tests/providers/docker/operators/test_docker.py
index 0430e0ae2c..02734eede8 100644
--- a/tests/providers/docker/operators/test_docker.py
+++ b/tests/providers/docker/operators/test_docker.py
@@ -101,7 +101,7 @@ class TestDockerOperator:
             host_tmp_dir="/host/airflow",
             container_name="test_container",
             tty=True,
-            hostname="test.contrainer.host",
+            hostname="test.container.host",
             device_requests=[DeviceRequest(count=-1, capabilities=[["gpu"]])],
             log_opts_max_file="5",
             log_opts_max_size="10m",
@@ -128,7 +128,7 @@ class TestDockerOperator:
             entrypoint=["sh", "-c"],
             working_dir="/container/path",
             tty=True,
-            hostname="test.contrainer.host",
+            hostname="test.container.host",
         )
         self.client_mock.create_host_config.assert_called_once_with(
             mounts=[
@@ -185,7 +185,7 @@ class TestDockerOperator:
             shm_size=1000,
             host_tmp_dir="/host/airflow",
             container_name="test_container",
-            hostname="test.contrainer.host",
+            hostname="test.container.host",
             tty=True,
         )
         operator.execute(None)
@@ -204,7 +204,7 @@ class TestDockerOperator:
             entrypoint=["sh", "-c"],
             working_dir="/container/path",
             tty=True,
-            hostname="test.contrainer.host",
+            hostname="test.container.host",
         )
         self.client_mock.create_host_config.assert_called_once_with(
             mounts=[