Skip to content

python

A set of tasks for a Pythonproject

List of tasks

Tasks Description
python:black Black formater. Arguments: [ARG|A=--check] [IMG|I=pyfound/black] [PULL|P=n|N] (*)
python:lint Python lint with flake8. Arguments: [ARG|A=path/to/code/] (*)

global variables

Variables Description Default value
IMAGE_BLACK Default Black image pyfound/black:latest_release
IMAGE_PYTHON Default Python image python:3-bookworm

python:black

Black formater. Arguments: [ARG|A=--check] [IMG|I=pyfound/black] [PULL|P=n|N] (*)

[PYTHON] Black formater.
Usage: task python:black [ARG|A=--check] [IMG|I=pyfound/black] [PULL|P=<n|N>]
Arguments Description
ARG | A Arguments or options to passto black CLI (optional, by default current directory)
IMG | I Docker black image to use (optional, by default {{.IMAGE_BLACK}})
PULL | P Pull docker image (optional, by default yes)

Requirements:

  • black or docker

python:lint

Python lint with flake8. Arguments: [ARG|A=path/to/code/] (*)

[PYTHON] Linter with flake8.
Usage: task python:lint [ARG|A=path/to/code/]
Arguments Description
ARG | A Arguments or options to pass to flake CLI (optional, by default current directory)

Requirements:

  • python with flake8 or docker