import click
from spanky.cli import pass_context


@click.command('users', short_help='creates users base on /etc/spanky/users')
@pass_context
def cli(ctx):
    config = ctx.config.load('users.yml')

import click
from spanky.cli import pass_context
from spanky.lib.users import UserInit


@click.command('users', short_help='creates users base on /etc/spanky/users')
@pass_context
def cli(ctx):
    config = ctx.config.load('users.yml')()
    user_init = UserInit(config)
    user_init.build()

Use the config when creating users.
Use the config when creating users.

  import click
  from spanky.cli import pass_context
+ from spanky.lib.users import UserInit
  
  
  @click.command('users', short_help='creates users base on /etc/spanky/users')
  @pass_context
  def cli(ctx):
-     config = ctx.config.load('users.yml')
+     config = ctx.config.load('users.yml')()
+     user_init = UserInit(config)
+     user_init.build()
  
Use the config when creating users.
## Code Before:
import click
from spanky.cli import pass_context


@click.command('users', short_help='creates users base on /etc/spanky/users')
@pass_context
def cli(ctx):
    config = ctx.config.load('users.yml')

## Instruction:
Use the config when creating users.
## Code After:
import click
from spanky.cli import pass_context
from spanky.lib.users import UserInit


@click.command('users', short_help='creates users base on /etc/spanky/users')
@pass_context
def cli(ctx):
    config = ctx.config.load('users.yml')()
    user_init = UserInit(config)
    user_init.build()
