mirror of
https://github.com/daylinmorgan/task.mk.git
synced 2024-12-22 01:50:44 -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,$(mlmsg))
|
||||||
$(call tprint,{a.custom(fg=(148, 255, 15),bg=(103, 2, 15))}Custom Colors TOO!{a.end})
|
$(call tprint,{a.custom(fg=(148, 255, 15),bg=(103, 2, 15))}Custom Colors TOO!{a.end})
|
||||||
|
|
||||||
|
.PHONY: task.mk
|
||||||
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
|
define USAGE
|
||||||
{a.$(HEADER_COLOR)}usage:{a.end}
|
{a.$(HEADER_COLOR)}usage:{a.end}
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
|
|
||||||
codes_names = {
|
codes_names = {
|
||||||
getattr(ansi, attr): attr
|
getattr(ansi, attr): attr
|
||||||
for attr in dir(ansi)
|
for attr in ansi.__dict__
|
||||||
if attr[0:1] != "_" and attr != "end" and attr != "setcode"
|
|
||||||
}
|
}
|
||||||
for code in sorted(codes_names.keys(), key=lambda item: (len(item), item)):
|
for code in sorted(codes_names.keys(), key=lambda item: (len(item), item)):
|
||||||
print("{:>20} {}".format(codes_names[code], code + "******" + ansi.end))
|
print("{:>20} {}".format(codes_names[code], code + "******" + ansi.end))
|
||||||
|
|
5
task.mk
5
task.mk
|
@ -1,7 +1,7 @@
|
||||||
# }> [github.com/daylinmorgan/task.mk] <{ #
|
# }> [github.com/daylinmorgan/task.mk] <{ #
|
||||||
# Copyright (c) 2022 Daylin Morgan
|
# Copyright (c) 2022 Daylin Morgan
|
||||||
# MIT License
|
# MIT License
|
||||||
# version: 22.9.7
|
# version: c036a27
|
||||||
#
|
#
|
||||||
# task.mk should be included at the bottom of your Makefile.
|
# 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.
|
# See below for the standard configuration options that should be set prior to including this file.
|
||||||
|
@ -240,8 +240,7 @@ $(ansi_py)
|
||||||
|
|
||||||
codes_names = {
|
codes_names = {
|
||||||
getattr(ansi, attr): attr
|
getattr(ansi, attr): attr
|
||||||
for attr in dir(ansi)
|
for attr in ansi.__dict__
|
||||||
if attr[0:1] != "_" and attr != "end" and attr != "setcode"
|
|
||||||
}
|
}
|
||||||
for code in sorted(codes_names.keys(), key=lambda item: (len(item), item)):
|
for code in sorted(codes_names.keys(), key=lambda item: (len(item), item)):
|
||||||
print("{:>20} {}".format(codes_names[code], code + "******" + ansi.end))
|
print("{:>20} {}".format(codes_names[code], code + "******" + ansi.end))
|
||||||
|
|
Loading…
Reference in a new issue