MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / Label

Class Label

thirdparty/clientform/clientform.py:1156–1179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1154
1155
1156class Label:
1157 def __init__(self, attrs):
1158 self.id = attrs.get("for")
1159 self._text = attrs.get("__text").strip()
1160 self._ctext = compress_text(self._text)
1161 self.attrs = attrs
1162 self._backwards_compat = False # maintained by HTMLForm
1163
1164 def __getattr__(self, name):
1165 if name == "text":
1166 if self._backwards_compat:
1167 return self._text
1168 else:
1169 return self._ctext
1170 return getattr(Label, name)
1171
1172 def __setattr__(self, name, value):
1173 if name == "text":
1174 # don't see any need for this, so make it read-only
1175 raise AttributeError("text attribute is read-only")
1176 self.__dict__[name] = value
1177
1178 def __str__(self):
1179 return "<Label(id=%r, text=%r)>" % (self.id, self.text)
1180
1181
1182def _get_label(attrs):

Callers 4

_ParseFileExFunction · 0.85
_get_labelFunction · 0.85
__init__Method · 0.85
get_labelsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…