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 82abd79913 Fix some non-critical pre-commit issues (#41749)
82abd79913 is described below
commit 82abd7991353ca4fb611129f76ba3f6095d7deb1
Author: Tzu-ping Chung <[email protected]>
AuthorDate: Tue Aug 27 21:13:32 2024 +0800
Fix some non-critical pre-commit issues (#41749)
The '.venv' name (common for in-project virtual environments) is not
included in rat-excludes, causing a lint failure since a license is not
found in it. Since 'venv' (no leading dot) is excluded, let's also add
'.venv' to the file.
The 'downgradedb' method of BaseDBManager is declared abstract, but not
implemented in FABDBManager. This causes Mypy to error when FABDBManager
is instantiated. We don't always need the implement the method, so let's
remove the abstractmethod decorator.
Finally (and least critically), when you run pre-commit during a merge,
a hook checks if you're committing unresolved conflicts. The check is
not particularly smart, however, and can mis-identify header underlines
in restructuredText as false positives. This is easy to fix; just add
one more character to the underline. It's fine as long as the underline
is not EXACTLY SEVEN characters.
---
.rat-excludes | 1 +
airflow/utils/db_manager.py | 3 +--
docs/README.rst | 2 +-
docs/apache-airflow-providers-arangodb/operators/index.rst | 2 +-
docs/apache-airflow-providers-github/operators/index.rst | 2 +-
docs/apache-airflow/administration-and-deployment/lineage.rst | 2 +-
.../administration-and-deployment/production-deployment.rst | 2 +-
docs/apache-airflow/authoring-and-scheduling/plugins.rst | 2 +-
docs/apache-airflow/core-concepts/sensors.rst | 2 +-
docs/apache-airflow/license.rst | 2 +-
docs/apache-airflow/project.rst | 2 +-
docs/apache-airflow/security/secrets/index.rst | 2 +-
docs/docker-stack/index.rst | 2 +-
docs/docker-stack/recipes.rst | 2 +-
tests/test_utils/perf/perf_kit/__init__.py | 3 ++-
15 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/.rat-excludes b/.rat-excludes
index 864301b7a2..d8b514e0b1 100644
--- a/.rat-excludes
+++ b/.rat-excludes
@@ -19,6 +19,7 @@
.rat-excludes
.stylelintignore
.stylelintrc
+.venv
requirements
requirements.txt
.*log
diff --git a/airflow/utils/db_manager.py b/airflow/utils/db_manager.py
index 07d1ee9a61..78d3244cd2 100644
--- a/airflow/utils/db_manager.py
+++ b/airflow/utils/db_manager.py
@@ -17,7 +17,6 @@
from __future__ import annotations
import os
-from abc import abstractmethod
from typing import TYPE_CHECKING
from alembic import command
@@ -86,9 +85,9 @@ class BaseDBManager(LoggingMixin):
config = self.get_alembic_config()
command.upgrade(config, revision=to_version or "heads",
sql=show_sql_only)
- @abstractmethod
def downgradedb(self, to_version, from_version=None, show_sql_only=False):
"""Downgrade the database."""
+ raise NotImplementedError
class RunDBManager(LoggingMixin):
diff --git a/docs/README.rst b/docs/README.rst
index 9cb436c0f2..9919672195 100644
--- a/docs/README.rst
+++ b/docs/README.rst
@@ -272,7 +272,7 @@ In this example error, You should change the line with
error so that the whole p
Line with Error: '
airflow.providers.amazon.aws.hook.base_aws.BaseAsyncSessionFactory has been
deprecated'
Support
-=======
+========
If you need help, write to `#documentation
<https://apache-airflow.slack.com/archives/CJ1LVREHX>`__ channel on `Airflow's
Slack <https://s.apache.org/airflow-slack>`__.
diff --git a/docs/apache-airflow-providers-arangodb/operators/index.rst
b/docs/apache-airflow-providers-arangodb/operators/index.rst
index 24c01aad1f..33b4e10064 100644
--- a/docs/apache-airflow-providers-arangodb/operators/index.rst
+++ b/docs/apache-airflow-providers-arangodb/operators/index.rst
@@ -46,7 +46,7 @@ please provide **template_searchpath** while creating **DAG**
object,
:end-before: [END howto_aql_operator_template_file_arangodb]
Sensors
-=======
+========
Use the :class:`~airflow.providers.arangodb.sensors.arangodb.AQLSensor` to
wait for a document or collection using
AQL query in `ArangoDB <https://www.arangodb.com/>`__.
diff --git a/docs/apache-airflow-providers-github/operators/index.rst
b/docs/apache-airflow-providers-github/operators/index.rst
index ba1544b112..1b2bf63894 100644
--- a/docs/apache-airflow-providers-github/operators/index.rst
+++ b/docs/apache-airflow-providers-github/operators/index.rst
@@ -51,7 +51,7 @@ An example of Listing Tags in a Repository,
**client.get_repo(full_name_or_id='a
Sensors
-=======
+========
You can build your own sensor using
:class:`~airflow.providers.github.sensors.GithubSensor`,
diff --git a/docs/apache-airflow/administration-and-deployment/lineage.rst
b/docs/apache-airflow/administration-and-deployment/lineage.rst
index 382aaa36d5..de20dd8f1d 100644
--- a/docs/apache-airflow/administration-and-deployment/lineage.rst
+++ b/docs/apache-airflow/administration-and-deployment/lineage.rst
@@ -18,7 +18,7 @@
Lineage
-=======
+========
.. note:: Lineage support is very experimental and subject to change.
diff --git
a/docs/apache-airflow/administration-and-deployment/production-deployment.rst
b/docs/apache-airflow/administration-and-deployment/production-deployment.rst
index a341f7f178..f8dccbac78 100644
---
a/docs/apache-airflow/administration-and-deployment/production-deployment.rst
+++
b/docs/apache-airflow/administration-and-deployment/production-deployment.rst
@@ -71,7 +71,7 @@ DAGs and configs across your nodes, e.g., checkout DAGs from
git repo every 5 mi
Logging
-=======
+========
If you are using disposable nodes in your cluster, configure the log storage
to be a distributed file system
(DFS) such as ``S3`` and ``GCS``, or external services such as Stackdriver
Logging, Elasticsearch or
diff --git a/docs/apache-airflow/authoring-and-scheduling/plugins.rst
b/docs/apache-airflow/authoring-and-scheduling/plugins.rst
index fcdd79028d..d8dbad9753 100644
--- a/docs/apache-airflow/authoring-and-scheduling/plugins.rst
+++ b/docs/apache-airflow/authoring-and-scheduling/plugins.rst
@@ -18,7 +18,7 @@
Plugins
-=======
+========
Airflow has a simple plugin manager built-in that can integrate external
features to its core by simply dropping files in your
diff --git a/docs/apache-airflow/core-concepts/sensors.rst
b/docs/apache-airflow/core-concepts/sensors.rst
index bbe61e68f9..dfe94a50ff 100644
--- a/docs/apache-airflow/core-concepts/sensors.rst
+++ b/docs/apache-airflow/core-concepts/sensors.rst
@@ -16,7 +16,7 @@
under the License.
Sensors
-=======
+========
Sensors are a special type of :doc:`Operator <operators>` that are designed to
do exactly one thing - wait for something to occur. It can be time-based, or
waiting for a file, or an external event, but all they do is wait until
something happens, and then *succeed* so their downstream tasks can run.
diff --git a/docs/apache-airflow/license.rst b/docs/apache-airflow/license.rst
index e5bb13e36b..3ef9a61927 100644
--- a/docs/apache-airflow/license.rst
+++ b/docs/apache-airflow/license.rst
@@ -18,7 +18,7 @@
License
-=======
+========
.. image:: img/apache.jpg
:width: 150
diff --git a/docs/apache-airflow/project.rst b/docs/apache-airflow/project.rst
index e0876f4e38..a36432ebda 100644
--- a/docs/apache-airflow/project.rst
+++ b/docs/apache-airflow/project.rst
@@ -18,7 +18,7 @@
Project
-=======
+========
History
-------
diff --git a/docs/apache-airflow/security/secrets/index.rst
b/docs/apache-airflow/security/secrets/index.rst
index 3fced1edfb..0db0e7a6ff 100644
--- a/docs/apache-airflow/security/secrets/index.rst
+++ b/docs/apache-airflow/security/secrets/index.rst
@@ -16,7 +16,7 @@
under the License.
Secrets
-=======
+========
During Airflow operation, variables or configurations are used that contain
particularly sensitive information.
This guide provides ways to protect this data.
diff --git a/docs/docker-stack/index.rst b/docs/docker-stack/index.rst
index 80f899aca9..e5620daa24 100644
--- a/docs/docker-stack/index.rst
+++ b/docs/docker-stack/index.rst
@@ -204,7 +204,7 @@ security email, nor GitHub Issues which are exclusively
about Airflow Issues not
public security issues.
Support
-=======
+========
The reference Docker Image supports the following platforms and database:
diff --git a/docs/docker-stack/recipes.rst b/docs/docker-stack/recipes.rst
index 1b37d2c3bd..3402acb101 100644
--- a/docs/docker-stack/recipes.rst
+++ b/docs/docker-stack/recipes.rst
@@ -16,7 +16,7 @@
under the License.
Recipes
-=======
+========
Users sometimes share interesting ways of using the Docker images. We
encourage users to contribute these
recipes to the documentation in case they prove useful to other members of the
community by
diff --git a/tests/test_utils/perf/perf_kit/__init__.py
b/tests/test_utils/perf/perf_kit/__init__.py
index 13252f4569..0112761554 100644
--- a/tests/test_utils/perf/perf_kit/__init__.py
+++ b/tests/test_utils/perf/perf_kit/__init__.py
@@ -23,7 +23,8 @@ Useful decorators and context managers used when testing the
performance of vari
Content
-=======
+========
+
The following decorators and context managers are included.
.. autofunction:: tests.utils.perf.perf_kit.memory.trace_memory