Class TypeShed

java.lang.Object
org.sonar.python.types.TypeShed

public class TypeShed extends Object
  • Method Details

    • setProjectLevelSymbolTable

      public static void setProjectLevelSymbolTable(ProjectLevelSymbolTable projectLevelSymbolTable)
    • builtinSymbols

      public static Map<String,Symbol> builtinSymbols()
    • getLoadedTypeShedSymbols

      public static Map<String,Map<String,Symbol>> getLoadedTypeShedSymbols()
    • typeShedClass

      public static ClassSymbol typeShedClass(String fullyQualifiedName)
    • symbolsForModule

      public static Map<String,Symbol> symbolsForModule(String moduleName)
      Returns map of exported symbols by name for a given module
    • symbolWithFQN

      @CheckForNull public static Symbol symbolWithFQN(String stdLibModuleName, String fullyQualifiedName)
    • symbolWithFQN

      @CheckForNull public static Symbol symbolWithFQN(String fullyQualifiedName)
    • stubFilesSymbols

      public static Collection<Symbol> stubFilesSymbols()
      Returns stub symbols to be used by SonarSecurity. Ambiguous symbols that only contain class symbols are disambiguated with latest Python version.
    • stubModules

      public static Set<String> stubModules()
    • normalizedFqn

      public static String normalizedFqn(String fqn)
    • normalizedFqn

      public static String normalizedFqn(String fqn, String moduleName, String localName)
    • normalizedFqn

      public static String normalizedFqn(String fqn, String moduleName, String localName, @Nullable String containerClassFqn)
    • isValidForProjectPythonVersion

      public static boolean isValidForProjectPythonVersion(List<String> validForPythonVersions)
    • symbolsFromProtobufDescriptors

      public static Set<Symbol> symbolsFromProtobufDescriptors(Set<Object> protobufDescriptors, @Nullable String containerClassFqn, String moduleName, boolean isFromClass)
    • classDescriptorWithFQN

      @CheckForNull public static SymbolsProtos.ClassSymbol classDescriptorWithFQN(String fullyQualifiedName)
    • resetBuiltinSymbols

      public static void resetBuiltinSymbols()