Skip to content

Commit 99a0d67

Browse files
committed
DEV: undo emitting command strings for dev.py lint
These get emitted unconditionally, so this is wrong and a bit noisy. It does work fine in classes decorated with `cli.cls_cmd`, but not in the plain `task`'s. [skip ci]
1 parent fefb726 commit 99a0d67

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

dev.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,12 @@ def run(cls, **kwargs):
881881
# linters
882882

883883
def emit_cmdstr(cmd):
884-
"""Print the command that's being run to stdout"""
884+
"""Print the command that's being run to stdout
885+
886+
Note: cannot use this in the below tasks (yet), because as is these command
887+
strings are always echoed to the console, even if the command isn't run
888+
(but for example the `build` command is run).
889+
"""
885890
console = Console(theme=console_theme)
886891
# The [cmd] square brackets controls the font styling, typically in italics
887892
# to differentiate it from other stdout content
@@ -891,7 +896,7 @@ def emit_cmdstr(cmd):
891896
def task_lint():
892897
# Lint just the diff since branching off of main using a
893898
# stricter configuration.
894-
emit_cmdstr(os.path.join('tools', 'lint.py') + ' --diff-against main')
899+
# emit_cmdstr(os.path.join('tools', 'lint.py') + ' --diff-against main')
895900
return {
896901
'basename': 'lint',
897902
'actions': [str(Dirs().root / 'tools' / 'lint.py') +
@@ -901,7 +906,7 @@ def task_lint():
901906

902907

903908
def task_unicode_check():
904-
emit_cmdstr(os.path.join('tools', 'unicode-check.py'))
909+
# emit_cmdstr(os.path.join('tools', 'unicode-check.py'))
905910
return {
906911
'basename': 'unicode-check',
907912
'actions': [str(Dirs().root / 'tools' / 'unicode-check.py')],
@@ -911,7 +916,7 @@ def task_unicode_check():
911916

912917

913918
def task_check_test_name():
914-
emit_cmdstr(os.path.join('tools', 'check_test_name.py'))
919+
# emit_cmdstr(os.path.join('tools', 'check_test_name.py'))
915920
return {
916921
"basename": "check-testname",
917922
"actions": [str(Dirs().root / "tools" / "check_test_name.py")],

0 commit comments

Comments
 (0)