Skip to content

Commit ff8f8b8

Browse files
committed
Add a yapf file and format all the code.
1 parent 02e58a7 commit ff8f8b8

26 files changed

+1164
-687
lines changed

.style.yapf

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
[style]
2+
based_on_style = pep8
3+
4+
# █████ ██ ██
5+
# ██ ██ ██ ██
6+
# ███████ ██ ██
7+
# ██ ██ ██ ██
8+
# ██ ██ ███████ ███████
9+
10+
11+
# Align closing bracket with visual indentation.
12+
# align_closing_bracket_with_visual_indent=True
13+
14+
# Allow dictionary keys to exist on multiple lines. For example:
15+
#
16+
# x = {
17+
# ('this is the first element of a tuple',
18+
# 'this is the second element of a tuple'):
19+
# value,
20+
# }
21+
# allow_multiline_dictionary_keys=False
22+
23+
# Allow lambdas to be formatted on more than one line.
24+
# allow_multiline_lambdas=False
25+
26+
# Insert a blank line before a class-level docstring.
27+
# blank_line_before_class_docstring=False
28+
29+
# Insert a blank line before a 'def' or 'class' immediately nested
30+
# within another 'def' or 'class'. For example:
31+
#
32+
# class Foo:
33+
# # <------ this blank line
34+
# def method():
35+
# ...
36+
# blank_line_before_nested_class_or_def=False
37+
38+
# Do not split consecutive brackets. Only relevant when
39+
# dedent_closing_brackets is set. For example:
40+
#
41+
# call_func_that_takes_a_dict(
42+
# {
43+
# 'key1': 'value1',
44+
# 'key2': 'value2',
45+
# }
46+
# )
47+
#
48+
# would reformat to:
49+
#
50+
# call_func_that_takes_a_dict({
51+
# 'key1': 'value1',
52+
# 'key2': 'value2',
53+
# })
54+
coalesce_brackets=True
55+
56+
# The column limit.
57+
# column_limit=79
58+
59+
# Indent width used for line continuations.
60+
# continuation_indent_width=4
61+
62+
# Put closing brackets on a separate line, dedented, if the bracketed
63+
# expression can't fit in a single line. Applies to all kinds of brackets,
64+
# including function definitions and calls. For example:
65+
#
66+
# config = {
67+
# 'key1': 'value1',
68+
# 'key2': 'value2',
69+
# } # <--- this bracket is dedented and on a separate line
70+
#
71+
# time_series = self.remote_client.query_entity_counters(
72+
# entity='dev3246.region1',
73+
# key='dns.query_latency_tcp',
74+
# transform=Transformation.AVERAGE(window=timedelta(seconds=60)),
75+
# start_ts=now()-timedelta(days=3),
76+
# end_ts=now(),
77+
# ) # <--- this bracket is dedented and on a separate line
78+
dedent_closing_brackets=True
79+
80+
# Place each dictionary entry onto its own line.
81+
# each_dict_entry_on_separate_line=True
82+
83+
# The regex for an i18n comment. The presence of this comment stops
84+
# reformatting of that line, because the comments are required to be
85+
# next to the string they translate.
86+
# i18n_comment=
87+
88+
# The i18n function call names. The presence of this function stops
89+
# reformattting on that line, because the string it has cannot be moved
90+
# away from the i18n comment.
91+
# i18n_function_call=
92+
93+
# Indent the dictionary value if it cannot fit on the same line as the
94+
# dictionary key. For example:
95+
#
96+
# config = {
97+
# 'key1':
98+
# 'value1',
99+
# 'key2': value1 +
100+
# value2,
101+
# }
102+
indent_dictionary_value=True
103+
104+
# The number of columns to use for indentation.
105+
# indent_width=4
106+
107+
# Join short lines into one line. E.g., single line 'if' statements.
108+
join_multiple_lines=False
109+
110+
# Do not include spaces around selected binary operators. For example:
111+
#
112+
# 1 + 2 * 3 - 4 / 5
113+
#
114+
# will be formatted as follows when configured with a value "*,/":
115+
#
116+
# 1 + 2*3 - 4/5
117+
#
118+
# no_spaces_around_selected_binary_operators=set()
119+
120+
# Use spaces around default or named assigns.
121+
# spaces_around_default_or_named_assign=False
122+
123+
# Use spaces around the power operator.
124+
# spaces_around_power_operator=False
125+
126+
# The number of spaces required before a trailing comment.
127+
# spaces_before_comment=2
128+
129+
# Insert a space between the ending comma and closing bracket of a list,
130+
# etc.
131+
# space_between_ending_comma_and_closing_bracket=True
132+
133+
# Split before arguments if the argument list is terminated by a
134+
# comma.
135+
# split_arguments_when_comma_terminated=False
136+
137+
# Set to True to prefer splitting before '&', '|' or '^' rather than
138+
# after.
139+
# split_before_bitwise_operator=True
140+
141+
# Split before a dictionary or set generator (comp_for). For example, note
142+
# the split before the 'for':
143+
#
144+
# foo = {
145+
# variable: 'Hello world, have a nice day!'
146+
# for variable in bar if variable != 42
147+
# }
148+
# split_before_dict_set_generator=True
149+
150+
# If an argument / parameter list is going to be split, then split before
151+
# the first argument.
152+
split_before_first_argument=True
153+
154+
# Set to True to prefer splitting before 'and' or 'or' rather than
155+
# after.
156+
# split_before_logical_operator=True
157+
158+
# Split named assignments onto individual lines.
159+
# split_before_named_assigns=True
160+
161+
# The penalty for splitting right after the opening bracket.
162+
# split_penalty_after_opening_bracket=30
163+
164+
# The penalty for splitting the line after a unary operator.
165+
# split_penalty_after_unary_operator=10000
166+
167+
# The penalty for splitting right before an if expression.
168+
# split_penalty_before_if_expr=0
169+
170+
# The penalty of splitting the line around the '&', '|', and '^'
171+
# operators.
172+
# split_penalty_bitwise_operator=300
173+
174+
# The penalty for characters over the column limit.
175+
# split_penalty_excess_character=4500
176+
177+
# The penalty incurred by adding a line split to the unwrapped line. The
178+
# more line splits added the higher the penalty.
179+
# split_penalty_for_added_line_split=30
180+
181+
# The penalty of splitting a list of "import as" names. For example:
182+
#
183+
# from a_very_long_or_indented_module_name_yada_yad import (long_argument_1,
184+
# long_argument_2,
185+
# long_argument_3)
186+
#
187+
# would reformat to something like:
188+
#
189+
# from a_very_long_or_indented_module_name_yada_yad import (
190+
# long_argument_1, long_argument_2, long_argument_3)
191+
# split_penalty_import_names=0
192+
193+
# The penalty of splitting the line around the 'and' and 'or'
194+
# operators.
195+
# split_penalty_logical_operator=300
196+
197+
# Use the Tab character for indentation.
198+
# use_tabs=False

client/setup.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
3-
43
"""
54
wdb
65
"""
@@ -9,11 +8,7 @@
98

109
__version__ = '3.1.5'
1110

12-
requires = [
13-
"log_colorizer>=1.8.3",
14-
"jedi>=0.9.0",
15-
'uncompyle6'
16-
]
11+
requires = ["log_colorizer>=1.8.3", "jedi>=0.9.0", 'uncompyle6']
1712

1813
if sys.version_info[:2] <= (2, 6):
1914
requires.append('argparse')
@@ -33,18 +28,22 @@
3328
platforms="Any",
3429
packages=['wdb'],
3530
install_requires=requires,
36-
entry_points={'console_scripts': [
37-
'wdb=wdb.__main__:main',
38-
'wdb-%s=wdb.__main__:main' % sys.version[:3]]},
31+
entry_points={
32+
'console_scripts': [
33+
'wdb=wdb.__main__:main',
34+
'wdb-%s=wdb.__main__:main' % sys.version[:3]
35+
]
36+
},
3937
classifiers=[
40-
"Development Status :: 4 - Beta",
41-
"Intended Audience :: Developers",
38+
"Development Status :: 4 - Beta", "Intended Audience :: Developers",
4239
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
4340
"Operating System :: OS Independent",
4441
"Programming Language :: Python :: 2",
4542
"Programming Language :: Python :: 3",
4643
"Programming Language :: Python :: Implementation :: CPython",
4744
"Programming Language :: Python :: Implementation :: PyPy",
48-
"Topic :: Software Development :: Debuggers"])
45+
"Topic :: Software Development :: Debuggers"
46+
]
47+
)
4948

5049
setup(**options)

0 commit comments

Comments
 (0)