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@ce223b068409dcfca805d5f6fed92e7d06d47fd2
Entrypoint
Return Type
Black
Example
dagger -m github.com/tsirysndr/daggerverse/black@ce223b068409dcfca805d5f6fed92e7d06d47fd2 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@ce223b068409dcfca805d5f6fed92e7d06d47fd2 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@ce223b068409dcfca805d5f6fed92e7d06d47fd2 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()
}