Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 649a728

Browse filesBrowse files
cclaussBethGriggs
authored andcommitted
test: from functools import reduce in test/testpy/__init__.py
$ __make lint-py__ # When run on Python 3 ``` PYTHONPATH=tools/pip python -m flake8 . \ --count --show-source --statistics --select=E901,E999,F821,F822,F823 \ --exclude=.git,deps,lib,src,tools/*_macros.py,tools/gyp,tools/inspector_protocol,tools/jinja2,tools/markupsafe,tools/pip ./test/testpy/__init__.py:119:37: F821 undefined name 'reduce' file_path = join(self.root, reduce(join, test[1:], "")) ^ ./test/testpy/__init__.py:161:37: F821 undefined name 'reduce' file_path = join(self.root, reduce(join, test[1:], "") + ".js") ^ 2 F821 undefined name 'reduce' 2 make: *** [lint-py] Error 1 ``` PR-URL: #24954 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 1e09629 commit 649a728
Copy full SHA for 649a728

File tree

Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Open diff view settings
Collapse file

‎test/testpy/__init__.py‎

Copy file name to clipboardExpand all lines: test/testpy/__init__.py
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
import re
3232
import ast
3333

34+
try:
35+
reduce
36+
except NameError:
37+
from functools import reduce
38+
3439

3540
FLAGS_PATTERN = re.compile(r"//\s+Flags:(.*)")
3641
FILES_PATTERN = re.compile(r"//\s+Files:(.*)")

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.