MCPcopy
hub / github.com/will8211/unimatrix / get_attr

Method get_attr

unimatrix.py:600–614  ·  view source on GitHub ↗

Returns either A_BOLD attribute or A_NORMAL based on Bold setting "above=True" means it an extra green character used to overwrite the while head character.

(node, above=False)

Source from the content-addressed store, hash-verified

598
599 @staticmethod
600 def get_attr(node, above=False):
601 """
602 Returns either A_BOLD attribute or A_NORMAL based on Bold setting
603 "above=True" means it an extra green character used to overwrite the
604 while head character.
605 """
606 if args.no_bold:
607 return curses.A_NORMAL
608 elif args.all_bold:
609 return curses.A_BOLD
610 else:
611 if node.white and not above:
612 return curses.A_BOLD
613 else:
614 return choice([curses.A_BOLD, curses.A_NORMAL])
615
616 def draw(self, node):
617 """

Callers 1

drawMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected