Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def cli(ctx, list, verbose, exe):
"""Apio configuration."""
if list: # pragma: no cover
profile = Profile()
profile.list()
elif verbose: # pragma: no cover
profile = Profile()
profile.add_config('verbose', verbose)
elif exe: # pragma: no cover
profile = Profile()
profile.add_config('exe', exe)
else:
click.secho(ctx.get_help())
def _setup_windows(self):
profile = Profile()
resources = Resources()
self.name = 'drivers'
self.version = util.get_package_version(self.name, profile)
self.spec_version = util.get_package_spec_version(self.name, resources)
def __init__(self, package):
self.package = package
self.config = Config()
self.profile = Profile()
data = self.config.packages[package]
self.version = self._get_version(
data['repository']['name'],
data['repository']['organization'],
data['release']['tag_name']
)
self.arch = self._get_architecture()
self.compressed_name = data['release']['compressed_name'].replace('%V', self.version).replace('%A', self.arch)
self.uncompressed_name = data['release']['uncompressed_name'].replace('%V', self.version).replace('%A', self.arch)
self.package_name = data['release']['package_name']
if isinstance(data['release']['extension'], dict):
def _setup_darwin(self):
self.profile = Profile()
def __init__(self):
profile = Profile()
resources = Resources()
self.name = 'examples'
self.examples_dir = util.get_package_dir(self.name)
self.version = util.get_package_version(self.name, profile)
self.spec_version = util.get_package_spec_version(self.name, resources)
def __init__(self, project_dir=''):
self.profile = Profile()
self.resources = Resources()
if project_dir is not None:
# Move to project dir
project_dir = util.check_dir(project_dir)
os.chdir(project_dir)