mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
refactor: removed unnecesary else
This commit is contained in:
+7
-7
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user