Comments between fmt:on/off are reformatted
See original GitHub issueThis code:
# fmt: off
#nospace
# twospaces
# fmt: on
is changed to:
# fmt: off
# nospace
# twospaces
# fmt: on
I expected the lines betwen # fmt: off
and # fmt: on
to remain unchanged.
- Version: master (19.10b1.dev22+gbe49ac7)
- OS: Ubuntu Linux
- Python: 3.6.9
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:6
Top Results From Across the Web
https://github.com/ambv/black/commit/36d3c516d3c09...
From 36d3c516d3c09fc5f05c420900dd6b854e3c8bbd Mon Sep 17 00:00:00 2001 ... blackd.py | 90 +++++++--- tests/data/fmtonoff.py | 4 +- tests/empty.toml | 1 + ...
Read more >01/01: gnu: Separate Python core packages from the rest.
gnu/packages/python.scm: Move hundreds of package definitions from here. ... archive with a specially formatted filename and -the @code{.whl} extension.
Read more >Download Diff File - Rekahsoft Git Repositories
+Expressions are constructed from parsed strings or directly in Python. ... archive with a specially formatted filename and +the @code{.whl} extension.
Read more >Download Patch File - Sysnove Git Service
From 5510691d7e0543852165d691e01f7a2ef595e8bc Mon Sep 17 00:00:00 2001 From: ... now correctly indents comments in files that were previously formatted with ...
Read more >https://yhetil.org/guix/3addb3c46a/s/gnu-packages-...
@item Makes transitioning between Bash and Python easier. ... (which "python3"))) (substitute* '("tests/data/fmtonoff.py" "tests/data/string_prefixes.py" ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@aljabadi I don’t think we format CFG files 🤔
Another use-case that’s affected:
Black alters
#SBATCH
into# SBATCH
. The former is interpreted by SLURM, the latter ignoredEDIT: already reported in https://github.com/psf/black/issues/1024