fixing codacy issues

This commit is contained in:
Romain Dorgueil
2017-05-01 11:02:28 +02:00
parent 204135e5e0
commit 670f4e61d1
9 changed files with 10 additions and 24 deletions

View File

@ -3,14 +3,12 @@ import os
def execute():
try:
import edgy.project
from edgy.project.__main__ import handle_init
except ImportError as exc:
raise ImportError(
'You must install "edgy.project" to use this command.\n\n $ pip install edgy.project\n'
) from exc
from edgy.project.__main__ import handle_init
return handle_init(os.path.join(os.getcwd(), 'Projectfile'))

View File

@ -20,7 +20,7 @@ def get_default_services(filename, services=None):
}
try:
exec(code, context)
except Exception as exc:
except Exception:
raise
return {
**context[DEFAULT_SERVICES_ATTR](),
@ -55,7 +55,7 @@ def execute(file, quiet=False):
'but it is something that will be implemented in the future.\n\nExpected: 1, got: {}.'
).format(len(graphs))
name, graph = list(graphs.items())[0]
graph = list(graphs.values())[0]
# todo if console and not quiet, then add the console plugin
# todo when better console plugin, add it if console and just disable display