Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,14 @@ repos:
files: ^airflow/models/taskinstance.py$|^airflow/models/taskinstancehistory.py$
pass_filenames: false
require_serial: true
- id: prevent-usage-of-session.query
name: Prevent usage of session.query in core airflow
entry: ./scripts/ci/pre_commit/usage_session_query.py
language: python
additional_dependencies: ['rich>=12.4.4']
files: ^airflow.*\.py$
exclude: ^airflow/tests/.*\.py$
pass_filenames: true
- id: check-deferrable-default
name: Check and fix default value of default_deferrable
language: python
Expand Down
2 changes: 2 additions & 0 deletions contributing-docs/08_static_code_checks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,8 @@ require Breeze Docker image to be built locally.
+-----------------------------------------------------------+--------------------------------------------------------+---------+
| pretty-format-json | Format JSON files | |
+-----------------------------------------------------------+--------------------------------------------------------+---------+
| prevent-usage-of-session.query | Prevent usage of session.query in core airflow | |
+-----------------------------------------------------------+--------------------------------------------------------+---------+
| pylint | pylint | |
+-----------------------------------------------------------+--------------------------------------------------------+---------+
| python-no-log-warn | Check if there are no deprecate log warn | |
Expand Down
Loading
Loading