List<PyRequirement> (@NotNull Module module, @NotNull Sdk sdk, @NotNull Set<String> ignoredPackages) { final PyPackageManager manager = PyPackageManager.getInstance(sdk); final List<PyRequirement> requirements = manager.getRequirements(module); if (requirements != null) { final List<PyPackage> packages = manager.getPackages(); if (packages == null) { return null; } final List<PyPackage> packagesInModule = collectPackagesInModule(module); final List<PyRequirement> unsatisfied = new ArrayList<>(); for (PyRequirement req : requirements) { if (!ignoredPackages.contains(req.getName()) && req.match(packages) == null && req.match(packagesInModule) == null) { unsatisfied.add(req); } } return unsatisfied; } return null; }