Skip to content

Commit 9702164

Browse files
[Python] Fix "too many leading '#' for block comment"
See discussion with @gribozavr in #1287 (comment)
1 parent 29ce0fe commit 9702164

File tree

6 files changed

+33
-39
lines changed

6 files changed

+33
-39
lines changed

.pep8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[flake8]
22
filename = *.py,build-script,gyb,line-directive,ns-html2rst,pre-commit-benchmark,recursive-lipo,submit-benchmark-results,update-checkout,viewcfg
3-
ignore = E101,E111,E114,E128,E266,E265,E302,E402,E501,W191
3+
ignore = E101,E111,E128,E265,E302,E402,E501,W191

tools/SourceKit/bindings/python/sourcekitd/capi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
callbacks = {}
3535

36-
### Structures and Utility Classes ###
36+
# Structures and Utility Classes
3737

3838
class CachedProperty(object):
3939
"""Decorator that lazy-loads the value of a property.

utils/GYBUnicodeDataUtils.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
##===--------------------------------------------------*- coding: utf-8 -*-===##
2-
##
3-
## This source file is part of the Swift.org open source project
4-
##
5-
## Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
6-
## Licensed under Apache License v2.0 with Runtime Library Exception
7-
##
8-
## See http://swift.org/LICENSE.txt for license information
9-
## See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10-
##
11-
##===----------------------------------------------------------------------===##
2+
#
3+
# This source file is part of the Swift.org open source project
4+
#
5+
# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
6+
# Licensed under Apache License v2.0 with Runtime Library Exception
7+
#
8+
# See http://swift.org/LICENSE.txt for license information
9+
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1210

1311
import re
1412
import codecs

utils/SwiftIntTypes.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
##===--- SwiftIntTypes.py -----------------------------*- coding: utf-8 -*-===##
2-
##
3-
## This source file is part of the Swift.org open source project
4-
##
5-
## Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
6-
## Licensed under Apache License v2.0 with Runtime Library Exception
7-
##
8-
## See http://swift.org/LICENSE.txt for license information
9-
## See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10-
##
11-
##===----------------------------------------------------------------------===##
2+
#
3+
# This source file is part of the Swift.org open source project
4+
#
5+
# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
6+
# Licensed under Apache License v2.0 with Runtime Library Exception
7+
#
8+
# See http://swift.org/LICENSE.txt for license information
9+
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1210

1311
# Bit counts for all int types
1412
_all_integer_type_bitwidths = [8, 16, 32, 64]

utils/gyb.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ def splitLines(s):
4747
# The part of an '%end' line that follows the '%' sign
4848
linesClose = r'[\ \t]* end [\ \t]* (?: \# .* )? $'
4949

50-
## Note: Where "# Absorb" appears below, the regexp attempts to eat up
51-
## through the end of ${...} and %{...}% constructs. In reality we
52-
## handle this with the Python tokenizer, which avoids mis-detections
53-
## due to nesting, comments and strings. This extra absorption in the
54-
## regexp facilitates testing the regexp on its own, by preventing the
55-
## interior of some of these constructs from being treated as literal
56-
## text.
50+
# Note: Where "# Absorb" appears below, the regexp attempts to eat up
51+
# through the end of ${...} and %{...}% constructs. In reality we
52+
# handle this with the Python tokenizer, which avoids mis-detections
53+
# due to nesting, comments and strings. This extra absorption in the
54+
# regexp facilitates testing the regexp on its own, by preventing the
55+
# interior of some of these constructs from being treated as literal
56+
# text.
5757
tokenizeRE = re.compile(
5858
r'''
5959
# %-lines and %{...}-blocks

utils/swift-bench.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
#!/usr/bin/env python
22
##===--- swift-bench.py -------------------------------*- coding: utf-8 -*-===##
3-
##
4-
## This source file is part of the Swift.org open source project
5-
##
6-
## Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
7-
## Licensed under Apache License v2.0 with Runtime Library Exception
8-
##
9-
## See http://swift.org/LICENSE.txt for license information
10-
## See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
11-
##
12-
##===----------------------------------------------------------------------===##
3+
#
4+
# This source file is part of the Swift.org open source project
5+
#
6+
# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
7+
# Licensed under Apache License v2.0 with Runtime Library Exception
8+
#
9+
# See http://swift.org/LICENSE.txt for license information
10+
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1311

1412
# This file implements a test harness for running Swift performance benchmarks.
1513
#

0 commit comments

Comments
 (0)