Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Pylint-Airflow

Code style: Black License: MIT https://img.shields.io/circleci/project/github/BasPH/pylint-airflow/master.svg images/pylint-airflow.png

Pylint plugin for static code analysis on Airflow code.

Usage

Installation:

pip install pylint-airflow

Usage:

pylint --load-plugins=pylint_airflow [your_file]

This plugin runs on Python 3.6 and higher.

Error codes

The Pylint-Airflow codes follow the structure {I,C,R,W,E,F}83{0-9}{0-9}, where:

The current codes are:

Code

Symbol

Description

C8300

different-operator-varname-taskid

For consistency assign the same variable name and task_id to operators.

C8301

match-callable-taskid

For consistency name the callable function ‘_[task_id]’, e.g. PythonOperator(task_id=’mytask’, python_callable=_mytask).

C8302

mixed-dependency-directions

For consistency don’t mix directions in a single statement, instead split over multiple statements.

C8303

task-no-dependencies

Sometimes a task without any dependency is desired, however often it is the result of a forgotten dependency.

C8304

task-context-argname

Indicate you expect Airflow task context variables in the **kwargs argument by renaming to **context.

C8305

task-context-separate-arg

To avoid unpacking kwargs from the Airflow task context in a function, you can set the needed variables as arguments in the function.

C8306

match-dagid-filename

For consistency match the DAG filename with the dag_id.

R8300

unused-xcom

Return values from a python_callable function or execute() method are automatically pushed as XCom.

W8300

basehook-top-level

Airflow executes DAG scripts periodically and anything at the top level of a script is executed. Therefore, move BaseHook calls into functions/hooks/operators.

E8300

duplicate-dag-name

DAG name should be unique.

E8301

duplicate-task-name

Task name within a DAG should be unique.

E8302

duplicate-dependency

Task dependencies can be defined only once.

E8303

dag-with-cycles

A DAG is acyclic and cannot contain cycles.

E8304

task-no-dag

A task must know a DAG instance to run.

Documentation

Documentation is available on Read the Docs.

Contributing

Suggestions for more checks are always welcome, please create an issue on GitHub. Read CONTRIBUTING.rst for more details.

Metadata

Release files for pylint-airflow 0.1.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pylint-airflow 0.1.0a1
File Size Uploaded
pylint-airflow-0.1.0a1.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pylint-airflow 0.1.0a1
File Interpreter ABI Platform
pylint_airflow-0.1.0a1-py3-none-any.whl Python 3 none any Details

Total release size: 16.6 kB

Release files / pylint-airflow-0.1.0a1.tar.gz

Download URL pylint-airflow-0.1.0a1.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a0e3edb13932f35b24b24e66ebe596541600575b755b78a2a33d74d8bf94b620
BLAKE2b-256 checksum
How to use checksums
ff55619e9e6b5710eee8439c725ab18e10ca6da47d1c6b90c7a43770debd1915
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

Release files / pylint_airflow-0.1.0a1-py3-none-any.whl

Download URL pylint_airflow-0.1.0a1-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
530a43e902831f2806dc3f672c7eb46ac1378106c400a04dce2ea1ccd5c4d0c3
BLAKE2b-256 checksum
How to use checksums
5f795fff2161bfecfc249eb8050685e2403488d83290ac4e6237781176f3968e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

Release history Release notifications | RSS feed

This release

0.1.0a1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page