refactor: removed unnecesary else

This commit is contained in:
Woile
2017-09-16 21:04:24 +02:00
parent 824206664d
commit 077246ea8b
+7 -7
View File
@@ -1503,13 +1503,7 @@ def uninstall(
in_dev_packages = (norm_name in project._pipfile.get('dev-packages', {}))
in_packages = (norm_name in project._pipfile.get('packages', {}))
if in_dev_packages or in_packages:
puts(
u'Removing {0} from Pipfile…'.format(
crayons.green(package_name)
)
)
else:
if not in_dev_packages and not in_packages:
puts(
'No package {0} to remove from Pipfile.'.format(
crayons.green(package_name)
@@ -1517,6 +1511,12 @@ def uninstall(
)
continue
puts(
u'Removing {0} from Pipfile…'.format(
crayons.green(package_name)
)
)
# Remove package from both packages and dev-packages.
project.remove_package_from_pipfile(package_name, dev=True)
project.remove_package_from_pipfile(package_name, dev=False)