MCPcopy Index your code
hub / github.com/clips/pattern / normalize_attrs

Method normalize_attrs

pattern/web/feed/feedparser.py:1936–1943  ·  view source on GitHub ↗
(self, attrs)

Source from the content-addressed store, hash-verified

1934 sgmllib.SGMLParser.close(self)
1935
1936 def normalize_attrs(self, attrs):
1937 if not attrs:
1938 return attrs
1939 # utility method to be called by descendants
1940 attrs = dict([(k.lower(), v) for k, v in attrs]).items()
1941 attrs = [(k, k in ('rel', 'type') and v.lower() or v) for k, v in attrs]
1942 attrs.sort()
1943 return attrs
1944
1945 def unknown_starttag(self, tag, attrs):
1946 # called for each start tag

Callers 2

unknown_starttagMethod · 0.80
unknown_starttagMethod · 0.80

Calls 2

itemsMethod · 0.45
sortMethod · 0.45

Tested by

no test coverage detected