Code formatting

Could we please have a code formatter?

I copy my anvil code out to Python Formatter and Beautifier and paste the formatted code back in before committing from dev to master branch.

Admin note: Moved out of a documentation thread into Q&A.
(The original post probably wanted to be in Feature Requests, but actually this is something Anvil already has :wink: )

Alt+Shift+F does the formatting.

You can also configure it by adding pyproject.toml to the repository.

See here for more details: [Done] Add Black Code Formatter - #4

4 Likes

And, of course, you can read more in the docs (check the Linting and Formatting section):

2 Likes