PyClass (@Nullable String qName, Project project) { if (qName == null) { return null; } int pos = qName.lastIndexOf("."); String shortName = pos > 0 ? qName.substring(pos + 1) : qName; for (PyClass pyClass : find(shortName, project, ProjectScope.getAllScope(project))) { if (qName.equals(pyClass.getQualifiedName())) { return pyClass; } } return null; }