THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
service MetadataRepositoryService { TRegisterResponse Register(1: TRegisterRequest request); } struct TRegisterRequest { 1: required list<string> applicationIds 2: required TNetworkAddress address } struct TRegisterResponse { 1: required set<TMetadatum> metadata } |
Python
When editing existing code, you should follow existing code style in the file you are editing. In general, our code tries to follow PEP8 style with some exceptions:
- We wrap lines at 90 characters (instead of 80)
- We use 2 spaces indent (instead of 4)
- We use whitespace around {{ = }} signs
- We sometimes use only one blank line where PEP8 suggests two
The following tools have been found useful by developers to scan and/or automatically fix formatting issues:
- pycodestyle (formerly known as pep8) - A checker for PEP8 conformance
- autopep8 - A tool that automatically formats code to conform with PEP8
- vim-syntastic - A plugin for vim that can highlight style violations
All tools above can be used with the same configuration file. As a starting point, consider using this one:
Code Block |
---|
[pep8]
# E101 - Reindent all lines.
# E111 - indentation is not a multiple of four
# E114 - indentation is not a multiple of four (comment)
# E251 - Remove whitespace around parameter '=' sign.
# E301 - Add missing blank line.
ignore = E101,E111,E114,E251,E301
max-line-length = 90 |