Enforce Best Practices for all your Airflow DAGs. ⭐
Project description
airflint
Enforce Best Practices for all your Airflow DAGs. ⭐
🧑🏫 Rules
- Use function-level imports instead of top-level imports[^1] (see Top level Python Code)
- Use jinja macro instead of
Variable.get
(see Airflow Variables)
[^1]: There is a PEP for Lazy Imports targeted to arrive in Python 3.12 which would supersede this rule.
based on official Best Practices
🚀 Get started
To install it from PyPI run:
pip install airflint
Then just call it like this:
pre-commit
Alternatively you can add the following repo to your pre-commit-config.yaml
:
- repo: https://github.com/feluelle/airflint
rev: v0.1.2-alpha
hooks:
- id: airflint
args: ["-a"] # Use -a for replacing inplace
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
airflint-0.2.0a0.tar.gz
(8.9 kB
view hashes)
Built Distribution
airflint-0.2.0a0-py3-none-any.whl
(10.5 kB
view hashes)
Close
Hashes for airflint-0.2.0a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 891e1ede1eb086673de1b2729aa8849153aece8d77e71283f274cb38e79abc74 |
|
MD5 | 85a5880cb111372467315a1be0d4bbca |
|
BLAKE2b-256 | 254614c54b919a83524ab8e7f3b307ff82130b2230085a78f7a7398efcb801f8 |