mirror of
https://github.com/daylinmorgan/task.mk.git
synced 2024-12-21 17:40:45 -06:00
fix: use __dict__ instead of dir
This commit is contained in:
parent
c036a27a57
commit
41c398065c
3 changed files with 5 additions and 6 deletions
3
Makefile
3
Makefile
|
@ -86,8 +86,9 @@ info:
|
|||
$(call tprint,$(mlmsg))
|
||||
$(call tprint,{a.custom(fg=(148, 255, 15),bg=(103, 2, 15))}Custom Colors TOO!{a.end})
|
||||
|
||||
.PHONY: task.mk
|
||||
task.mk:
|
||||
./generate.py $(shell git describe --tags) > task.mk
|
||||
./generate.py $(shell git describe --always | sed s'/dirty/dev/') > task.mk
|
||||
|
||||
define USAGE
|
||||
{a.$(HEADER_COLOR)}usage:{a.end}
|
||||
|
|
|
@ -5,8 +5,7 @@
|
|||
|
||||
codes_names = {
|
||||
getattr(ansi, attr): attr
|
||||
for attr in dir(ansi)
|
||||
if attr[0:1] != "_" and attr != "end" and attr != "setcode"
|
||||
for attr in ansi.__dict__
|
||||
}
|
||||
for code in sorted(codes_names.keys(), key=lambda item: (len(item), item)):
|
||||
print("{:>20} {}".format(codes_names[code], code + "******" + ansi.end))
|
||||
|
|
5
task.mk
5
task.mk
|
@ -1,7 +1,7 @@
|
|||
# }> [github.com/daylinmorgan/task.mk] <{ #
|
||||
# Copyright (c) 2022 Daylin Morgan
|
||||
# MIT License
|
||||
# version: 22.9.7
|
||||
# version: c036a27
|
||||
#
|
||||
# task.mk should be included at the bottom of your Makefile.
|
||||
# See below for the standard configuration options that should be set prior to including this file.
|
||||
|
@ -240,8 +240,7 @@ $(ansi_py)
|
|||
|
||||
codes_names = {
|
||||
getattr(ansi, attr): attr
|
||||
for attr in dir(ansi)
|
||||
if attr[0:1] != "_" and attr != "end" and attr != "setcode"
|
||||
for attr in ansi.__dict__
|
||||
}
|
||||
for code in sorted(codes_names.keys(), key=lambda item: (len(item), item)):
|
||||
print("{:>20} {}".format(codes_names[code], code + "******" + ansi.end))
|
||||
|
|
Loading…
Reference in a new issue