1+ [tool:pytest]
2+ testpaths = tests/
3+ addopts = --ignore =tests/test_documentation.py
4+ --ignore =tests/test_yapf_format.py
5+
6+ [flake8]
7+ max-line-length = 120
8+ ignore =
9+ D301
10+ E221 # Space before equal sign
11+ E251 # Space after equal sign
12+ exclude =
13+ .git,
14+ venv,
15+ __pycache__,
16+ .pytest_cache,
17+ tensorlayer.egg-info,
18+ build,
19+ dist,
20+ img
21+
22+ [yapf]
23+ based_on_style =google
24+
25+ # The number of columns to use for indentation.
26+ indent_width = 4
27+
28+ # The column limit.
29+ column_limit =120
30+
31+ # Place each dictionary entry onto its own line.
32+ each_dict_entry_on_separate_line = True
33+
34+ # Put closing brackets on a separate line, dedented, if the bracketed
35+ # expression can't fit in a single line. Applies to all kinds of brackets,
36+ # including function definitions and calls. For example:
37+ #
38+ # config = {
39+ # 'key1': 'value1',
40+ # 'key2': 'value2',
41+ # } # <--- this bracket is dedented and on a separate line
42+ #
43+ # time_series = self.remote_client.query_entity_counters(
44+ # entity='dev3246.region1',
45+ # key='dns.query_latency_tcp',
46+ # transform=Transformation.AVERAGE(window=timedelta(seconds=60)),
47+ # start_ts=now()-timedelta(days=3),
48+ # end_ts=now(),
49+ # ) # <--- this bracket is dedented and on a separate line
50+ dedent_closing_brackets =True
51+
52+ # Do not split consecutive brackets. Only relevant when DEDENT_CLOSING_BRACKETS is set
53+ coalesce_brackets = False
54+
55+ # Align closing bracket with visual indentation.
56+ align_closing_bracket_with_visual_indent = False
57+
58+ # Split named assignments onto individual lines.
59+ split_before_named_assigns = False
60+
61+ # If an argument / parameter list is going to be split, then split before the first argument.
62+ split_before_first_argument = True
63+
64+ # Split before arguments if the argument list is terminated by a comma.
65+ split_arguments_when_comma_terminated = False
66+
67+ # Insert a space between the ending comma and closing bracket of a list, etc.
68+ space_between_ending_comma_and_closing_bracket = True
69+
70+ # Join short lines into one line. E.g., single line if statements.
71+ join_multiple_lines = True
72+
73+ # Do not include spaces around selected binary operators.
74+ # Example: 1 + 2 * 3 - 4 / 5 => 1 + 2*3 - 4/5
75+ no_spaces_around_selected_binary_operators = True
76+
77+ # Allow lambdas to be formatted on more than one line.
78+ allow_multiline_lambdas = True
79+
80+ SPLIT_PENALTY_FOR_ADDED_LINE_SPLIT = 10
81+ SPLIT_PENALTY_AFTER_OPENING_BRACKET = 500
0 commit comments