Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Black supports ignoring sections with a `# fmt: off` directive, and a hand-formatted constant table is a common use for that:

https://black.readthedocs.io/en/stable/usage_and_configurati...

Other formatters have similar functionality; e.g.:

- /* prettier-ignore */: https://prettier.io/docs/en/ignore.html#javascript

- #[rustfmt::skip]: https://github.com/rust-lang/rustfmt?tab=readme-ov-file#tips



Thank you, that'll come in handy again, I'm sure.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: