black
This module provides a set of functions to format Python code with black and to create a development environment with black installed.
Installation
dagger install github.com/tsirysndr/daggerverse/black@e8bed26dfefaaf4ef3d00958965575131f34c69c
Entrypoint
Return Type
Black
Example
dagger -m github.com/tsirysndr/daggerverse/black@e8bed26dfefaaf4ef3d00958965575131f34c69c call \
func (m *myModule) example() *Black {
return dag.
Black()
}
@function
def example() -> dag.Black:
return (
dag.black()
)
@func()
example(): Black {
return dag
.black()
}
Types
Black 🔗
format() 🔗
Format Python code with black.
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory ! | - | No description provided |
path | String | "." | No description provided |
Example
dagger -m github.com/tsirysndr/daggerverse/black@e8bed26dfefaaf4ef3d00958965575131f34c69c call \
format --src DIR_PATH
func (m *myModule) example(src *Directory) *Directory {
return dag.
Black().
Format(src)
}
@function
def example(src: dagger.Directory) -> dagger.Directory:
return (
dag.black()
.format(src)
)
@func()
example(src: Directory): Directory {
return dag
.black()
.format(src)
}
dev() 🔗
Returns a container with black installed.
Return Type
Container !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory | - | No description provided |
Example
dagger -m github.com/tsirysndr/daggerverse/black@e8bed26dfefaaf4ef3d00958965575131f34c69c call \
dev
func (m *myModule) example() *Container {
return dag.
Black().
Dev()
}
@function
def example() -> dagger.Container:
return (
dag.black()
.dev()
)
@func()
example(): Container {
return dag
.black()
.dev()
}