Skip to content

Enforce Best Practices for all your Airflow DAGs. ⭐

License

Notifications You must be signed in to change notification settings

feluelle/airflint

Repository files navigation

airflint

pre-commit.ci status test workflow codeql-analysis workflow codecov PyPI version License PyPI - Python Version PyPI version

Enforce Best Practices for all your Airflow DAGs. ⭐

🧑‍🏫 Rules

  • use datetime instead of days_ago in DAG start_date
  • task decorator instead of PythonOperator and PythonVenvOperator
  • dag decorator instead of DAG
  • jinja string instead of Variable.get

⚠️ airflint does not remove imports. For removing unused imports please use autoflake additionally.

Please check the known issues first, in case you find any bugs. If you cannot find them there, please open an Issue.

💡 Future Ideas

  • fix Official Airflow DeprecationWarnings

🚀 Get started

To install it from PyPI run:

pip install airflint

Then just call it like this:

usage

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

About

Enforce Best Practices for all your Airflow DAGs. ⭐

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages