Proper render method actions
This commit is contained in:
parent
2dc00dc2cd
commit
d68fdf8d5d
@ -1,5 +1,6 @@
|
|||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
import types
|
||||||
|
|
||||||
from .colors import colors
|
from .colors import colors
|
||||||
|
|
||||||
@ -28,6 +29,8 @@ class Output:
|
|||||||
def colorized(self, action):
|
def colorized(self, action):
|
||||||
if hasattr(action, 'colorized'):
|
if hasattr(action, 'colorized'):
|
||||||
return action.colorized(self.colors)
|
return action.colorized(self.colors)
|
||||||
|
elif isinstance(action, types.MethodType):
|
||||||
|
return f'{action.__self__}.{action.__name__}'
|
||||||
else:
|
else:
|
||||||
return str(action)
|
return str(action)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user