Skip to content

Commit 976f1c4

Browse files
author
Thomas Preud'homme
committed
Fix flake8 failures
Fix flake8 failures when running tox and add a note in the README to run tox for testing patches. Reviewed By: tnfchris Differential Revision: https://reviews.llvm.org/D112304
1 parent 4510c28 commit 976f1c4

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,9 @@ The infrastructure has the following layout:
1616
$ROOT/tests - Tests for the infrastructure.
1717

1818
For more information, see the web documentation, or docs/.
19+
20+
Testing
21+
=======
22+
23+
Testing is done by running tox from the top-level directory. It runs the tests
24+
for both Python 2 and Python 3, it also checks code style.

lnt/formats/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from __future__ import absolute_import
1111
from typing import List, Dict
1212
try:
13-
from plistlib import readPlist
13+
from plistlib import readPlist # noqa: F401 # used to test exception
1414
from .PlistFormat2 import format as plist # for Python 2
1515
except ImportError:
1616
from .PlistFormat import format as plist # for Python 3

lnt/testing/profile/profile.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ def fromFile(f):
3030
ret = None
3131
with open(f, 'rb') as fd:
3232
if impl is lnt.testing.profile.perf.LinuxPerfProfile:
33-
ret = impl.deserialize(fd,
34-
nm = os.getenv('CMAKE_NM', 'nm'),
35-
objdump = os.getenv('CMAKE_OBJDUMP', 'objdump'),
36-
binaryCacheRoot = os.getenv('LNT_BINARY_CACHE_ROOT', ''))
33+
ret = impl.deserialize(
34+
fd,
35+
nm=os.getenv('CMAKE_NM', 'nm'),
36+
objdump=os.getenv('CMAKE_OBJDUMP', 'objdump'),
37+
binaryCacheRoot=os.getenv('LNT_BINARY_CACHE_ROOT', ''))
3738
else:
3839
ret = impl.deserialize(fd)
3940
if ret:

0 commit comments

Comments
 (0)