Skip to content

Enable aliases #8

Description

@hginzel

Consider task lint is an alias for ruff.

from doit_api import cmdtask
@cmdtask
def ruff():
  """Run linter (ruff)."""
  return 'ruff *.py'

@cmdtask
def lint(task_dep=['ruff']): # or task_dep=[ruff]
  """Alias for ruff."""
  #pass
  #return None
  return []

Or

lint = ruff

Or?

The first does not run the dependent task:

$ doit lint
.  lint =>

The second reports:

$ doit lint
ERROR: Task names must be unique. ruff

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions