Skip to content

Commit 04afd6e

Browse files
[Python] Improve consistency: "block comment should start with '# '" (PEP-8)
1 parent 790cd28 commit 04afd6e

File tree

8 files changed

+46
-45
lines changed

8 files changed

+46
-45
lines changed

.pep8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[flake8]
22
filename = *.py,Benchmark_Driver,Benchmark_DTrace.in,Benchmark_GuardMalloc.in,Benchmark_RuntimeLeaksRunner.in,build-script,gyb,line-directive,ns-html2rst,recursive-lipo,rth,submit-benchmark-results,update-checkout,viewcfg
3-
ignore = E101,E111,E128,E265,E302,E402,E501,W191
3+
ignore = E101,E111,E128,E302,E402,E501,W191

docs/conf.py

+35-35
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
# If extensions (or modules to document with autodoc) are in another directory,
1717
# add these directories to sys.path here. If the directory is relative to the
1818
# documentation root, use os.path.abspath to make it absolute, like shown here.
19-
#sys.path.insert(0, os.path.abspath('.'))
19+
# sys.path.insert(0, os.path.abspath('.'))
2020

2121
# -- General configuration -----------------------------------------------------
2222

2323
# If your documentation needs a minimal Sphinx version, state it here.
24-
#needs_sphinx = '1.0'
24+
# needs_sphinx = '1.0'
2525

2626
# Add any Sphinx extension module names here, as strings. They can be extensions
2727
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
@@ -34,7 +34,7 @@
3434
source_suffix = '.rst'
3535

3636
# The encoding of source files.
37-
#source_encoding = 'utf-8-sig'
37+
# source_encoding = 'utf-8-sig'
3838

3939
# The master toctree document.
4040
master_doc = 'contents'
@@ -54,11 +54,11 @@
5454

5555
# The language for content autogenerated by Sphinx. Refer to documentation
5656
# for a list of supported languages.
57-
#language = None
57+
# language = None
5858

5959
# There are two options for replacing |today|: either, you set today to some
6060
# non-false value, then it is used:
61-
#today = ''
61+
# today = ''
6262
# Else, today_fmt is used as the format for a strftime call.
6363
today_fmt = '%Y-%m-%d'
6464

@@ -67,14 +67,14 @@
6767
exclude_patterns = ['_build']
6868

6969
# The reST default role (used for this markup: `text`) to use for all documents.
70-
#default_role = None
70+
# default_role = None
7171

7272
# If true, '()' will be appended to :func: etc. cross-reference text.
73-
#add_function_parentheses = True
73+
# add_function_parentheses = True
7474

7575
# If true, the current module name will be prepended to all description
7676
# unit titles (such as .. function::).
77-
#add_module_names = True
77+
# add_module_names = True
7878

7979
# If true, sectionauthor and moduleauthor directives will be shown in the
8080
# output. They are ignored by default.
@@ -86,7 +86,7 @@
8686
highlight_language = 'swift'
8787

8888
# A list of ignored prefixes for module index sorting.
89-
#modindex_common_prefix = []
89+
# modindex_common_prefix = []
9090

9191

9292
# -- Options for HTML output ---------------------------------------------------
@@ -112,14 +112,14 @@
112112

113113
# The name for this set of Sphinx documents. If None, it defaults to
114114
# "<project> v<release> documentation".
115-
#html_title = None
115+
# html_title = None
116116

117117
# A shorter title for the navigation bar. Default is the same as html_title.
118-
#html_short_title = None
118+
# html_short_title = None
119119

120120
# The name of an image file (relative to this directory) to place at the top
121121
# of the sidebar.
122-
#html_logo = None
122+
# html_logo = None
123123

124124
# The name of an image file (within the static path) to use as favicon of the
125125
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
@@ -137,40 +137,40 @@
137137

138138
# If true, SmartyPants will be used to convert quotes and dashes to
139139
# typographically correct entities.
140-
#html_use_smartypants = True
140+
# html_use_smartypants = True
141141

142142
# Custom sidebar templates, maps document names to template names.
143-
#html_sidebars = {'index': 'indexsidebar.html'}
143+
# html_sidebars = {'index': 'indexsidebar.html'}
144144

145145
# Additional templates that should be rendered to pages, maps page names to
146146
# template names.
147147
html_additional_pages = {'LangRef': 'archive/LangRef.html'}
148148

149149
# If false, no module index is generated.
150-
#html_domain_indices = True
150+
# html_domain_indices = True
151151

152152
# If false, no index is generated.
153-
#html_use_index = True
153+
# html_use_index = True
154154

155155
# If true, the index is split into individual pages for each letter.
156-
#html_split_index = False
156+
# html_split_index = False
157157

158158
# If true, links to the reST sources are added to the pages.
159159
html_show_sourcelink = True
160160

161161
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
162-
#html_show_sphinx = True
162+
# html_show_sphinx = True
163163

164164
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
165-
#html_show_copyright = True
165+
# html_show_copyright = True
166166

167167
# If true, an OpenSearch description file will be output, and all pages will
168168
# contain a <link> tag referring to it. The value of this option must be the
169169
# base URL from which the finished HTML is served.
170-
#html_use_opensearch = ''
170+
# html_use_opensearch = ''
171171

172172
# This is the file name suffix for HTML files (e.g. ".xhtml").
173-
#html_file_suffix = None
173+
# html_file_suffix = None
174174

175175
# Output file base name for HTML help builder.
176176
htmlhelp_basename = 'Swiftdoc'
@@ -180,13 +180,13 @@
180180

181181
latex_elements = {
182182
# The paper size ('letterpaper' or 'a4paper').
183-
#'papersize': 'letterpaper',
183+
# 'papersize': 'letterpaper',
184184

185185
# The font size ('10pt', '11pt' or '12pt').
186-
#'pointsize': '10pt',
186+
# 'pointsize': '10pt',
187187

188188
# Additional stuff for the LaTeX preamble.
189-
#'preamble': '',
189+
# 'preamble': '',
190190
}
191191

192192
# Grouping the document tree into LaTeX files. List of tuples
@@ -198,23 +198,23 @@
198198

199199
# The name of an image file (relative to this directory) to place at the top of
200200
# the title page.
201-
#latex_logo = None
201+
# latex_logo = None
202202

203203
# For "manual" documents, if this is true, then toplevel headings are parts,
204204
# not chapters.
205-
#latex_use_parts = False
205+
# latex_use_parts = False
206206

207207
# If true, show page references after internal links.
208-
#latex_show_pagerefs = False
208+
# latex_show_pagerefs = False
209209

210210
# If true, show URL addresses after external links.
211-
#latex_show_urls = False
211+
# latex_show_urls = False
212212

213213
# Documents to append as an appendix to all manuals.
214-
#latex_appendices = []
214+
# latex_appendices = []
215215

216216
# If false, no module index is generated.
217-
#latex_domain_indices = True
217+
# latex_domain_indices = True
218218

219219

220220
# -- Options for manual page output --------------------------------------------
@@ -227,28 +227,28 @@
227227
]
228228

229229
# If true, show URL addresses after external links.
230-
#man_show_urls = False
230+
# man_show_urls = False
231231

232232

233233
# -- Options for Texinfo output ------------------------------------------------
234234

235235
# Grouping the document tree into Texinfo files. List of tuples
236236
# (source start file, target name, title, author,
237-
# dir menu entry, description, category)
237+
# dir menu entry, description, category)
238238
texinfo_documents = [
239239
('contents', 'Swift', u'Swift Documentation',
240240
u'LLVM project', 'Swift', 'One line description of project.',
241241
'Miscellaneous'),
242242
]
243243

244244
# Documents to append as an appendix to all manuals.
245-
#texinfo_appendices = []
245+
# texinfo_appendices = []
246246

247247
# If false, no module index is generated.
248-
#texinfo_domain_indices = True
248+
# texinfo_domain_indices = True
249249

250250
# How to display URL addresses: 'footnote', 'no', or 'inline'.
251-
#texinfo_show_urls = 'footnote'
251+
# texinfo_show_urls = 'footnote'
252252

253253

254254
# FIXME: Define intersphinx configuration.

utils/GYBUnicodeDataUtils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
##===--------------------------------------------------*- coding: utf-8 -*-===##
1+
# ===--- GYBUnicodeDataUtils.py -----------------------*- coding: utf-8 -*-===//
22
#
33
# This source file is part of the Swift.org open source project
44
#

utils/SwiftIntTypes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
##===--- SwiftIntTypes.py -----------------------------*- coding: utf-8 -*-===##
1+
# ===--- SwiftIntTypes.py -----------------------------*- coding: utf-8 -*-===//
22
#
33
# This source file is part of the Swift.org open source project
44
#

utils/cmpcodesize/cmpcodesize/compare.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# cmpcodesize/compare.py - Compare sizes of built products -*- python -*-
1+
# ====--- compare.py - Compare built products' sizes --*- coding: utf-8 -*-===//
22
#
33
# This source file is part of the Swift.org open source project
44
#
@@ -41,7 +41,7 @@
4141
}
4242

4343
infixes = {
44-
#Swift
44+
# Swift
4545
"q_": "Generic Function"
4646
}
4747

utils/protocol_graph.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#===--- protocol_graph.py -------------------------*- coding: utf-8 -*----===#
1+
# ===--- protocol_graph.py ----------------------------*- coding: utf-8 -*-===//
22
#
33
# This source file is part of the Swift.org open source project
44
#
@@ -8,7 +8,7 @@
88
# See http://swift.org/LICENSE.txt for license information
99
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
#
11-
#===----------------------------------------------------------------------===#
11+
# ===----------------------------------------------------------------------===//
1212
#
1313
# Create a graph of the protocol refinement relationships, associated
1414
# types, operator requirements, and defaulted generic operators.
@@ -20,7 +20,8 @@
2020
# (ccomps -zX#$N -o /tmp/protocols.dot /tmp/p0.dot || true) \
2121
# && dot -Tsvg /tmp/protocols.dot > /tmp/protocols.svg \
2222
# && open /tmp/protocols.svg
23-
#===----------------------------------------------------------------------===#
23+
#
24+
# ===----------------------------------------------------------------------===//
2425

2526
from __future__ import print_function
2627

utils/pygments/swift.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class SwiftLexer(RegexLexer):
129129

130130
'import': [
131131
(_name, Name.Namespace),
132-
#('\n', Punctuation, '#pop'),
132+
# ('\n', Punctuation, '#pop'),
133133
],
134134

135135
'generic-type': [

utils/swift-bench.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python
2-
##===--- swift-bench.py -------------------------------*- coding: utf-8 -*-===##
2+
# ===--- swift-bench.py -------------------------------*- coding: utf-8 -*-===//
33
#
44
# This source file is part of the Swift.org open source project
55
#

0 commit comments

Comments
 (0)