Skip to content

Ruff

902 rules ruff@0.16.8

Complete effective rule inventory.

Docs

Rules

40 rules on this page · 902 total

  • A001

    Variable {name} is shadowing a Python builtin

    No autofix
  • A002

    Function argument {name} is shadowing a Python builtin

    No autofix
  • A003

    Python builtin is shadowed by class attribute {name} from {row}

    No autofix
  • A004

    Import {name} is shadowing a Python builtin

    No autofix
  • A005

    Module {name} shadows a Python standard-library module

    No autofix
  • A006

    Lambda argument {name} is shadowing a Python builtin

    No autofix
  • AIR001

    Task variable name should match the task_id: "{task_id}"

    No autofix
  • AIR002

    DAG or @dag should have an explicit schedule argument

    No autofix
  • AIR003

    Variable.get() outside of a task

    No autofix
  • AIR004

    @task.branch can be replaced with @task.short_circuit

    No autofix
  • AIR201

    Use the .output attribute on the task object for "{task_id}" instead of xcom_pull in a template string

    Some reports are autofixable
  • AIR202

    @task-decorated function relies on multiple_outputs inference

    Always autofixable
  • AIR301

    {deprecated} is removed in Airflow 3.0

    Some reports are autofixable
  • AIR302

    {deprecated} is moved into {provider} provider in Airflow 3.0;

    Some reports are autofixable
  • AIR303

    {function_name} signature is changed in Airflow 3.0

    No autofix
  • AIR304

    {function_name}() produces a value that changes at runtime; using it in a Dag or task argument causes infinite Dag version creation

    No autofix
  • AIR311

    {deprecated} is removed in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.

    Some reports are autofixable
  • AIR312

    {deprecated} is deprecated and moved into {provider} provider in Airflow 3.0; It still works in Airflow 3.0 but is expected to be removed in a future version.

    Some reports are autofixable
  • AIR321

    {deprecated} is moved in Airflow 3.1

    Some reports are autofixable
  • ANN001

    Missing type annotation for function argument {name}

    No autofix
  • ANN002

    Missing type annotation for *{name}

    No autofix
  • ANN003

    Missing type annotation for **{name}

    No autofix
  • ANN201

    Missing return type annotation for public function {name}

    Some reports are autofixable
  • ANN202

    Missing return type annotation for private function {name}

    Some reports are autofixable
  • ANN204

    Missing return type annotation for special method {name}

    Some reports are autofixable
  • ANN205

    Missing return type annotation for staticmethod {name}

    Some reports are autofixable
  • ANN206

    Missing return type annotation for classmethod {name}

    Some reports are autofixable
  • ANN401

    Dynamically typed expressions (typing.Any) are disallowed in {name}

    No autofix
  • ARG001

    Unused function argument: {name}

    No autofix
  • ARG002

    Unused method argument: {name}

    No autofix
  • ARG003

    Unused class method argument: {name}

    No autofix
  • ARG004

    Unused static method argument: {name}

    No autofix
  • ARG005

    Unused lambda argument: {name}

    No autofix
  • ASYNC100

    A with {method_name}(...): context does not contain any await statements. This makes it pointless, as the timeout can only be triggered by a checkpoint.

    No autofix
  • ASYNC105

    Call to {method_name} is not immediately awaited

    Some reports are autofixable
  • ASYNC109

    Async function definition with a timeout parameter

    No autofix
  • ASYNC110

    Use {module}.Event instead of awaiting {module}.sleep in a while loop

    No autofix
  • ASYNC115

    Use {module}.lowlevel.checkpoint() instead of {module}.sleep(0)

    Always autofixable
  • ASYNC116

    {module}.sleep() with >24 hour interval should usually be {module}.sleep_forever()

    Some reports are autofixable
  • ASYNC119

    Yield in context manager in async generator may not trigger cleanup

    No autofix