Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def build_key_list(targets):
from bugwarrior.services import get_service
keys = {}
for target in targets:
keys[target] = get_service(target).ISSUE_CLASS.UNIQUE_KEY
return keys
targets = [t for t in targets if len(t)]
if not targets:
die("Empty targets= item in [%s]." % main_section)
for target in targets:
if target not in config.sections():
die("No [%s] section found." % target)
# Validate each target one by one.
for target in targets:
service = config.get(target, 'service')
if not service:
die("No 'service' in [%s]" % target)
if not get_service(service):
die("'%s' in [%s] is not a valid service." % (service, target))
# Call the service-specific validator
service = get_service(service)
service_config = ServiceConfig(service.CONFIG_PREFIX, config, target)
service.validate_config(service_config, target)
for target in targets:
if target not in config.sections():
die("No [%s] section found." % target)
# Validate each target one by one.
for target in targets:
service = config.get(target, 'service')
if not service:
die("No 'service' in [%s]" % target)
if not get_service(service):
die("'%s' in [%s] is not a valid service." % (service, target))
# Call the service-specific validator
service = get_service(service)
service_config = ServiceConfig(service.CONFIG_PREFIX, config, target)
service.validate_config(service_config, target)
'type': 'string',
},
'serviceBnumber': {
'label': 'Service B Number',
'type': 'numeric',
}
}
}
"""
from bugwarrior.services import get_service
targets_udas = {}
for target in targets:
targets_udas.update(get_service(target).ISSUE_CLASS.UDAS)
return {
'uda': targets_udas
}
def targets():
config = load_config('general')
for section in config.sections():
if section in ['general', 'notifications'] or \
section.startswith('flavor.'):
continue
service_name = config.get(section, 'service')
service_class = get_service(service_name)
for option in config.options(section):
value = config.get(section, option)
if not value:
continue
if '@oracle:use_keyring' in value:
service_config = ServiceConfig(
service_class.CONFIG_PREFIX, config, section)
yield service_class.get_keyring_service(service_config)