Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Krita
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Miguel Lopez
Krita
Commits
aa509c63
Commit
aa509c63
authored
Feb 28, 2018
by
Victor Wåhlström
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated HACKING file with Python guidelines
Differential Revision:
https://phabricator.kde.org/D6891
parent
f2be5255
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
HACKING
HACKING
+31
-0
No files found.
HACKING
View file @
aa509c63
...
...
@@ -132,3 +132,34 @@ Boolean operators
Boudewijn Rempt
With Krita now supporting Python scripting, we need guidelines for these as well.
These guidelines are preliminary and may be further refined in the future.
To keep it simple, we have chosen to follow the style guide suggested by Python: PEP8.
All rules should be followed, except the max limit of 79 characters per line. As this
can reduce readability in some cases, this rule is optional.
The full PEP8 specification is available here: https://www.python.org/dev/peps/pep-0008/
To check compliance you can run pep8.py against the code.
You can also use autopep8.py to automatically fix detected compliance issues.
pep8.py can be downloaded via Python's package manager (pip) [https://pypi.python.org/pypi/pep8],
or your distribution's package manager.
autopep8.py can also be downloaded via Python's package manager [https://pypi.python.org/pypi/autopep8],
or your distribution's package manager.
Both of these scripts come bundled with the PyDev plugin, which is available for Eclipse and other IDEs.
The PyDev integration can be configured to visually highlight portions of the code which is not in compliance,
as well as run autopep8 via shortcuts.
pep8.py and autopep8.py can suppress select rules via the "--ignore" command line argument.
To ignore the 79 charachers per line rule, pep8.py can be called like this:
pep8.py --ignore=E501
You can read more about the error codes and what they mean here:
http://pep8.readthedocs.io/en/release-1.7.x/intro.html#error-codes
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment