commit d29ec4d12567a6af6f483400658d2d2d17769a5a Merge: d580192 6cd814d Author: Damian Johnson atagar@torproject.org Date: Mon Jan 7 00:57:28 2013 -0800
Changing our style to mostly match PEP8
Stem now conforms with PEP8 with the following exceptions...
* four space indentations * strict 79 character line widths * no spaces around '=' in keyword args
If you're curious about why then see 'test/check_whitespace.py' for a short explanation, but I'm not interested in discussing this bike shed's color further. If both Sean and Ravi both want one of these to change then I'll accept a patch.
This also adds the pep8 style checker to our tests... http://pypi.python.org/pypi/pep8
You can run it via the '--style' argument.
run_tests.py | 208 +++-- stem/__init__.py | 110 ++- stem/connection.py | 510 ++++++----- stem/control.py | 1000 ++++++++++--------- stem/descriptor/__init__.py | 172 ++-- stem/descriptor/export.py | 36 +- stem/descriptor/extrainfo_descriptor.py | 386 ++++---- stem/descriptor/networkstatus.py | 525 ++++++----- stem/descriptor/reader.py | 273 +++--- stem/descriptor/router_status_entry.py | 360 ++++--- stem/descriptor/server_descriptor.py | 464 +++++----- stem/exit_policy.py | 340 ++++---- stem/prereq.py | 34 +- stem/process.py | 120 ++- stem/response/__init__.py | 242 +++--- stem/response/authchallenge.py | 26 +- stem/response/events.py | 365 ++++---- stem/response/getconf.py | 34 +- stem/response/getinfo.py | 37 +- stem/response/mapaddress.py | 14 +- stem/response/protocolinfo.py | 42 +- stem/socket.py | 306 ++++--- stem/util/__init__.py | 1 - stem/util/conf.py | 292 ++++--- stem/util/connection.py | 165 ++-- stem/util/enum.py | 80 +- stem/util/log.py | 107 ++- stem/util/ordereddict.py | 32 +- stem/util/proc.py | 238 +++-- stem/util/str_tools.py | 166 ++-- stem/util/system.py | 321 ++++--- stem/util/term.py | 29 +- stem/util/tor_tools.py | 42 +- stem/version.py | 130 ++-- test/__init__.py | 1 - test/check_whitespace.py | 124 ++- test/integ/__init__.py | 1 - test/integ/connection/__init__.py | 1 - test/integ/connection/authentication.py | 195 ++-- test/integ/connection/connect.py | 30 +- test/integ/control/__init__.py | 1 - test/integ/control/base_controller.py | 131 ++-- test/integ/control/controller.py | 553 ++++++----- test/integ/descriptor/__init__.py | 4 +- test/integ/descriptor/extrainfo_descriptor.py | 68 +- test/integ/descriptor/networkstatus.py | 175 ++-- test/integ/descriptor/reader.py | 289 +++--- test/integ/descriptor/server_descriptor.py | 112 ++-- test/integ/process.py | 97 +- test/integ/response/__init__.py | 1 - test/integ/response/protocolinfo.py | 78 +- test/integ/socket/__init__.py | 1 - test/integ/socket/control_message.py | 87 +- test/integ/socket/control_socket.py | 74 +- test/integ/util/__init__.py | 1 - test/integ/util/conf.py | 40 +- test/integ/util/proc.py | 40 +- test/integ/util/system.py | 144 ++-- test/integ/version.py | 34 +- test/mocking.py | 415 +++++---- test/network.py | 103 +- test/output.py | 103 ++- test/prompt.py | 38 +- test/runner.py | 342 ++++---- test/settings.cfg | 2 + test/unit/__init__.py | 1 - test/unit/connection/__init__.py | 1 - test/unit/connection/authentication.py | 60 +- test/unit/control/__init__.py | 1 - test/unit/control/controller.py | 186 ++-- test/unit/descriptor/__init__.py | 1 - test/unit/descriptor/export.py | 46 +- test/unit/descriptor/extrainfo_descriptor.py | 184 ++-- test/unit/descriptor/networkstatus/__init__.py | 1 - .../networkstatus/directory_authority.py | 108 ++-- test/unit/descriptor/networkstatus/document_v2.py | 6 +- test/unit/descriptor/networkstatus/document_v3.py | 369 ++++---- .../descriptor/networkstatus/key_certificate.py | 78 +- test/unit/descriptor/reader.py | 30 +- test/unit/descriptor/router_status_entry.py | 203 ++-- test/unit/descriptor/server_descriptor.py | 178 ++-- test/unit/exit_policy/__init__.py | 1 - test/unit/exit_policy/policy.py | 85 +- test/unit/exit_policy/rule.py | 90 +- test/unit/response/__init__.py | 1 - test/unit/response/authchallenge.py | 16 +- test/unit/response/control_line.py | 50 +- test/unit/response/control_message.py | 74 +- test/unit/response/events.py | 346 ++++---- test/unit/response/getconf.py | 38 +- test/unit/response/getinfo.py | 42 +- test/unit/response/mapaddress.py | 26 +- test/unit/response/protocolinfo.py | 64 +- test/unit/response/singleline.py | 10 +- test/unit/tutorial.py | 40 +- test/unit/util/__init__.py | 1 - test/unit/util/conf.py | 148 ++-- test/unit/util/connection.py | 64 +- test/unit/util/enum.py | 20 +- test/unit/util/proc.py | 86 +- test/unit/util/str_tools.py | 68 +- test/unit/util/system.py | 117 ++-- test/unit/util/tor_tools.py | 30 +- test/unit/version.py | 114 ++-- test/util.py | 29 +- 105 files changed, 7233 insertions(+), 6272 deletions(-)
tor-commits@lists.torproject.org