recentpopularlog in

kme : codestyle   15

psf/black: The uncompromising Python code formatter
Black is a well-behaved Unix-style command-line tool:

* it does nothing if no sources are passed to it;
* it will read from standard input and write to standard output if - is used as the filename;
* it only outputs messages to users on standard error; exits with code 0 unless an internal error occurred (or --check was used).
python  codingstyle  codestyle  formatter 
10 weeks ago by kme
GitHub - python/black: The uncompromising Python code formatter
The uncompromising Python code formatter. Contribute to python/black development by creating an account on GitHub.
python  formatter  linter  codestyle  opinionated  alternativeto  pycodestyle 
june 2019 by kme
GitHub - PyCQA/flake8-bugbear: A plugin for Flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle.
A plugin for Flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle. - PyCQA/flake8-bugbear
python  flake8  codestyle  formatter  linter 
june 2019 by kme
Question: why does PEP8 recommend leaving a blank line at the end of a .py file? : Python | https://www.reddit.com/
I still cannot find where in PEP 8 it says this, though.
The newline character is considered a line terminator, not a line delimiter.

This is right, but I think still somewhat confusing to some people. The point is that every line should end with a newline, because as was pointed out the newline is considered a line terminator.

I think the proper way to think of it is not to think of it as a blank line at the end of the file - that blank line appears in text editors, but if you were to open the file in python or most programming languages and do readlines, you wouldn't see any blank line at the end. The newline would be the last character in the last line which would be the line before the apparent blank line.
pep8  codestyle  linter  newline  textprocessing  explained 
december 2018 by kme
Structuring Your Project — The Hitchhiker's Guide to Python
Ravioli code is more likely in Python: it consists of hundreds of similar little pieces of logic, often classes or objects, without proper structure. If you never can remember if you have to use FurnitureTable, AssetTable or Table, or even TableNew for your task at hand, you might be swimming in ravioli code.
python  styleguide  bestpractices  codestyle  webdevel  devel 
june 2016 by kme
Artistic Style - Index
These options work well:

astyle -A2 -xC80 -xL -Y -p
cplusplus  java  c  linter  codestyle  formatter  utility  software 
april 2015 by kme

Copy this bookmark:





to read