Skip to content

Commit bcda3ff

Browse files
committed
Fix extra trailing newline in command outputc
1 parent 0e52f05 commit bcda3ff

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/no_code/__main__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66

77
def no_code_cmd() -> None:
88
code = Path(sys.argv[1]).read_text(encoding="utf-8") if len(sys.argv) > 1 else sys.stdin.read()
9-
print(no_code(code))
9+
sys.stdout.write(no_code(code))
10+
sys.stdout.flush()
1011

1112

1213
def yes_code_cmd() -> None:
1314
code = Path(sys.argv[1]).read_text(encoding="no-code") if len(sys.argv) > 1 else something(sys.stdin.read())
14-
print(code.removeprefix("# coding: no\n"))
15+
sys.stdout.write(code.removeprefix("# coding: no\n"))
16+
sys.stdout.flush()
1517

1618

1719
if __name__ == "__main__":

0 commit comments

Comments
 (0)