mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-22 23:53:48 +07:00
In addition to existing detection of shebang/double hash/doc comments we consider the following new cases when trying to insert space after '#' in Python line comments: * Comments that already start with whitespace are ignored by formatter. * Comments that span several lines (up to the first empty line or non-whitespace element) are not altered either because they may contain Python code fragments. * Trailing comments however can be safely adjusted because even if they contain any code, there cannot be any indentation inside.
3 lines
165 B
Python
3 lines
165 B
Python
# Whole-line commend that starts with whitespace.
|
|
if True: #Trailing comment with no whitespace
|
|
print 'Spam' # Trailing comment with excess whitespace |