Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SONARPY-2262 Introduce the TypesTable interface #2106

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

maksim-grebeniuk-sonarsource
Copy link
Contributor

@maksim-grebeniuk-sonarsource maksim-grebeniuk-sonarsource commented Oct 25, 2024

Copy link
Contributor

@ghislainpiot ghislainpiot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I think the idea of the resolveMember can and should be pushed a lot further. I will update with a ticket number of what I suggested

Comment on lines +43 to +49
@Override
public Optional<PythonType> resolveMember(String memberName) {
var memberFqn = Stream.of(importPath, memberName)
.filter(Predicate.not(String::isEmpty))
.collect(Collectors.joining("."));
return Optional.of(new UnresolvedImportType(memberFqn));
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we might want to extend this idea in the future, by allowing the creation of a "fake" type hierachy.

@maksim-grebeniuk-sonarsource maksim-grebeniuk-sonarsource merged commit 4a07b9d into master Oct 28, 2024
13 checks passed
@maksim-grebeniuk-sonarsource maksim-grebeniuk-sonarsource deleted the SONARPY-2262 branch October 28, 2024 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants