Skip to content

Commit 0b1582d

Browse files
committed
clarify hacking rules
1 parent 7407aaf commit 0b1582d

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

HACKING

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11

22
Conventions to follow while hacking:
33

4-
1. API should return data, not text.
4+
5+
1. API should return data, not text
56

67
2. functions or methods which print to stdout should be named with a
7-
prefix of cli_ and should only be used when invoked via the
8-
CLI. ie. API calls should not print to stdout.
8+
prefix of cli_ and should only be used when invoked via the CLI. Pure
9+
API calls should not print to stdout.
910

1011
3. Two blank lines after every function and method
1112

1213
4. Separate blocks of ideas within a function with a single blank line
1314

14-
5. flake8 otherwise
15+
5. flake8 (as configured in setup.cfg) otherwise
1516

1617
6. imports at the module level unless doing something tricky. Use
1718
relative imports as appropriate
1819

1920
7. don't over-nest function calls. don't be afraid to use a local
2021
variable to hold data between steps. It can be much clearer to read
21-
later.
22+
later
23+
24+
8. delete-trailing-whitespace or whatever it's called in your editor
2225

23-
8. delete-trailing-whitespace
26+
9. Run `tox` and fix any unexpected issues before committing.
2427

25-
9. Run `./setup.py flake8` and `./setup.py test` and fix any
26-
unexpected issues before committing.
28+
10. Add yourself to AUTHORS and your change to ChangeLog
2729

2830

29-
#
3031
# The end.

0 commit comments

Comments
 (0)