Skip to content

Commit 265c95d

Browse files
committed
Simplify Cli._select_unexpected_modules logic
This function simply returns a set difference, so there's no need for it to be any more complicated than that.
1 parent 9b102de commit 265c95d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

aqt/installer.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -274,12 +274,8 @@ def _check_mirror(self, mirror):
274274

275275
def _select_unexpected_modules(self, qt_version: str, modules: Optional[List[str]]) -> List[str]:
276276
"""Returns a sorted list of all the requested modules that do not exist in the combinations.json file."""
277-
if modules is None:
278-
return []
279277
available = Settings.available_modules(qt_version)
280-
if available is None:
281-
return sorted(modules)
282-
return sorted(set(modules) - set(available))
278+
return sorted(set(modules or []) - set(available or []))
283279

284280
@staticmethod
285281
def _determine_qt_version(

0 commit comments

Comments
 (0)