MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / prettyPrintType

Method prettyPrintType

pager_lib/pyasn1/type/univ.py:2746–2758  ·  view source on GitHub ↗
(self, scope=0)

Source from the content-addressed store, hash-verified

2744 return representation
2745
2746 def prettyPrintType(self, scope=0):
2747 scope += 1
2748 representation = '%s -> %s {\n' % (self.tagSet, self.__class__.__name__)
2749 for idx, componentType in enumerate(self.componentType.values() or self._componentValues):
2750 representation += ' ' * scope
2751 if self.componentType:
2752 representation += '"%s"' % self.componentType.getNameByPosition(idx)
2753 else:
2754 representation += '"%s"' % self._dynamicNames.getNameByPosition(idx)
2755 representation = '%s = %s\n' % (
2756 representation, componentType.prettyPrintType(scope)
2757 )
2758 return representation + '\n' + ' ' * (scope - 1) + '}'
2759
2760 # backward compatibility
2761

Callers 1

prettyPrintTypeMethod · 0.45

Calls 2

valuesMethod · 0.45
getNameByPositionMethod · 0.45

Tested by

no test coverage detected