Skip to content

Commit

Permalink
[Python] Fix "too many leading '#' for block comment"
Browse files Browse the repository at this point in the history
See discussion with @gribozavr in swiftlang#1287 (comment)
  • Loading branch information
practicalswift committed Feb 12, 2016
1 parent 29ce0fe commit 9702164
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .pep8
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[flake8]
filename = *.py,build-script,gyb,line-directive,ns-html2rst,pre-commit-benchmark,recursive-lipo,submit-benchmark-results,update-checkout,viewcfg
ignore = E101,E111,E114,E128,E266,E265,E302,E402,E501,W191
ignore = E101,E111,E128,E265,E302,E402,E501,W191
2 changes: 1 addition & 1 deletion tools/SourceKit/bindings/python/sourcekitd/capi.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

callbacks = {}

### Structures and Utility Classes ###
# Structures and Utility Classes

class CachedProperty(object):
"""Decorator that lazy-loads the value of a property.
Expand Down
18 changes: 8 additions & 10 deletions utils/GYBUnicodeDataUtils.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
##===--------------------------------------------------*- coding: utf-8 -*-===##
##
## This source file is part of the Swift.org open source project
##
## Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
## Licensed under Apache License v2.0 with Runtime Library Exception
##
## See http://swift.org/LICENSE.txt for license information
## See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
##
##===----------------------------------------------------------------------===##
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors

import re
import codecs
Expand Down
18 changes: 8 additions & 10 deletions utils/SwiftIntTypes.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
##===--- SwiftIntTypes.py -----------------------------*- coding: utf-8 -*-===##
##
## This source file is part of the Swift.org open source project
##
## Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
## Licensed under Apache License v2.0 with Runtime Library Exception
##
## See http://swift.org/LICENSE.txt for license information
## See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
##
##===----------------------------------------------------------------------===##
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors

# Bit counts for all int types
_all_integer_type_bitwidths = [8, 16, 32, 64]
Expand Down
14 changes: 7 additions & 7 deletions utils/gyb.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ def splitLines(s):
# The part of an '%end' line that follows the '%' sign
linesClose = r'[\ \t]* end [\ \t]* (?: \# .* )? $'

## Note: Where "# Absorb" appears below, the regexp attempts to eat up
## through the end of ${...} and %{...}% constructs. In reality we
## handle this with the Python tokenizer, which avoids mis-detections
## due to nesting, comments and strings. This extra absorption in the
## regexp facilitates testing the regexp on its own, by preventing the
## interior of some of these constructs from being treated as literal
## text.
# Note: Where "# Absorb" appears below, the regexp attempts to eat up
# through the end of ${...} and %{...}% constructs. In reality we
# handle this with the Python tokenizer, which avoids mis-detections
# due to nesting, comments and strings. This extra absorption in the
# regexp facilitates testing the regexp on its own, by preventing the
# interior of some of these constructs from being treated as literal
# text.
tokenizeRE = re.compile(
r'''
# %-lines and %{...}-blocks
Expand Down
18 changes: 8 additions & 10 deletions utils/swift-bench.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
#!/usr/bin/env python
##===--- swift-bench.py -------------------------------*- coding: utf-8 -*-===##
##
## This source file is part of the Swift.org open source project
##
## Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
## Licensed under Apache License v2.0 with Runtime Library Exception
##
## See http://swift.org/LICENSE.txt for license information
## See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
##
##===----------------------------------------------------------------------===##
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors

# This file implements a test harness for running Swift performance benchmarks.
#
Expand Down

0 comments on commit 9702164

Please sign in to comment.