From ba61783b31702f333811cc32224da1595d70858f Mon Sep 17 00:00:00 2001 From: Sebastian Zumbrunn Date: Tue, 26 Nov 2024 16:15:20 +0100 Subject: [PATCH] formatting and small fix after review --- .../sonar/python/semantic/v2/types/AstBasedTypeInference.java | 2 +- .../python/semantic/v2/types/TrivialTypePropagationVisitor.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python-frontend/src/main/java/org/sonar/python/semantic/v2/types/AstBasedTypeInference.java b/python-frontend/src/main/java/org/sonar/python/semantic/v2/types/AstBasedTypeInference.java index f56b246846..77720bb908 100644 --- a/python-frontend/src/main/java/org/sonar/python/semantic/v2/types/AstBasedTypeInference.java +++ b/python-frontend/src/main/java/org/sonar/python/semantic/v2/types/AstBasedTypeInference.java @@ -167,7 +167,7 @@ private static PythonType currentType(Name lhsName) { .orElse(null); } - public static Stream getSymbolNonDeclarationUsageTrees(SymbolV2 symbol) { + private static Stream getSymbolNonDeclarationUsageTrees(SymbolV2 symbol) { return symbol.usages() .stream() // Function and class definition names will always have FunctionType and ClassType respectively diff --git a/python-frontend/src/main/java/org/sonar/python/semantic/v2/types/TrivialTypePropagationVisitor.java b/python-frontend/src/main/java/org/sonar/python/semantic/v2/types/TrivialTypePropagationVisitor.java index b0e2982ab8..ad04ee91bd 100644 --- a/python-frontend/src/main/java/org/sonar/python/semantic/v2/types/TrivialTypePropagationVisitor.java +++ b/python-frontend/src/main/java/org/sonar/python/semantic/v2/types/TrivialTypePropagationVisitor.java @@ -91,7 +91,7 @@ private boolean isNumber(PythonType type) { private static PythonType toObjectType(PythonType type) { if (type == PythonType.UNKNOWN) { return type; - } else if(type instanceof ObjectType objectType) { + } else if (type instanceof ObjectType objectType) { return new ObjectType(objectType.typeWrapper(), objectType.attributes(), objectType.members(), objectType.typeSource()); } return new ObjectType(type);