Skip to content

Commit e82f0a0

Browse files
committed
Blacken
1 parent 576546a commit e82f0a0

File tree

2 files changed

+55
-41
lines changed

2 files changed

+55
-41
lines changed

noxfile.py

Lines changed: 49 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,44 @@
11
import nox
22

33

4-
@nox.session(python='2.7')
4+
@nox.session(python="2.7")
55
def cover(session):
6-
session.install('pytest', 'mock', 'coverage', 'pytest-cov')
7-
session.install('.')
8-
session.run('py.test', '--quiet', '--cov=google.cloud.happybase', '--cov=unit_tests', '--cov-config', '.coveragerc', 'unit_tests')
6+
session.install("pytest", "mock", "coverage", "pytest-cov")
7+
session.install(".")
8+
session.run(
9+
"py.test",
10+
"--quiet",
11+
"--cov=google.cloud.happybase",
12+
"--cov=unit_tests",
13+
"--cov-config",
14+
".coveragerc",
15+
"unit_tests",
16+
)
917

10-
@nox.session(python='2.7')
18+
19+
@nox.session(python="2.7")
1120
def docs(session):
12-
session.install('pytest', 'mock', 'Sphinx', 'sphinx_rtd_theme')
13-
session.install('.')
14-
session.run('python', '-c', "import shutil; shutil.rmtree('docs/_build', ignore_errors=True)")
15-
session.run('sphinx-build', '-W', '-b', 'html', '-d', 'docs/_build/doctrees', 'docs', 'docs/_build/html')
16-
session.run('python', 'scripts/verify_included_modules.py', '--build-root', '_build')
21+
session.install("pytest", "mock", "Sphinx", "sphinx_rtd_theme")
22+
session.install(".")
23+
session.run(
24+
"python",
25+
"-c",
26+
"import shutil; shutil.rmtree('docs/_build', ignore_errors=True)",
27+
)
28+
session.run(
29+
"sphinx-build",
30+
"-W",
31+
"-b",
32+
"html",
33+
"-d",
34+
"docs/_build/doctrees",
35+
"docs",
36+
"docs/_build/html",
37+
)
38+
session.run(
39+
"python", "scripts/verify_included_modules.py", "--build-root", "_build"
40+
)
41+
1742

1843
@nox.session(python="3.7")
1944
def lint(session):
@@ -22,36 +47,25 @@ def lint(session):
2247
serious code quality issues.
2348
"""
2449
session.install("flake8", "black")
25-
session.run(
26-
"black",
27-
"--check",
28-
"src",
29-
"docs",
30-
"unit_tests",
31-
"system_tests"
32-
)
50+
session.run("black", "--check", "src", "docs", "unit_tests", "system_tests")
3351
session.run("flake8", "google", "tests")
3452

35-
@nox.session(python='3.6')
53+
54+
@nox.session(python="3.6")
3655
def blacken(session):
3756
session.install("black")
38-
session.run(
39-
"black",
40-
"noxfile.py"
41-
"src",
42-
"docs",
43-
"unit_tests",
44-
"system_tests",
45-
)
57+
session.run("black", "noxfile.py" "src", "docs", "unit_tests", "system_tests")
4658

47-
@nox.session(python=['2.7', '3.4', '3.5'])
59+
60+
@nox.session(python=["2.7", "3.4", "3.5"])
4861
def tests(session):
49-
session.install('pytest', 'mock')
50-
session.install('.')
51-
session.run('py.test', '--quiet', 'unit_tests')
62+
session.install("pytest", "mock")
63+
session.install(".")
64+
session.run("py.test", "--quiet", "unit_tests")
65+
5266

53-
@nox.session(python=['2.7', '3.4'])
67+
@nox.session(python=["2.7", "3.4"])
5468
def system_tests(session):
55-
session.install('pytest', 'mock')
56-
session.install('.')
57-
session.run('python', 'system_tests/attempt_system_tests.py')
69+
session.install("pytest", "mock")
70+
session.install(".")
71+
session.run("python", "system_tests/attempt_system_tests.py")

system_tests/happybase.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -655,22 +655,22 @@ def test_put_with_timestamp(self):
655655
self.assertEqual(row1, row1_data_with_timestamps)
656656

657657
def test_put_not_encoded_value(self):
658-
value1 = 'hello world!'
659-
col1 = (COL_FAM1 + ':greetings').encode('utf-8')
658+
value1 = "hello world!"
659+
col1 = (COL_FAM1 + ":greetings").encode("utf-8")
660660
row1_data = {col1: value1}
661-
661+
662662
# Need to clean-up row1 after, in case it doesn't fail.
663663
self.rows_to_delete.append(ROW_KEY1)
664664
with self.assertRaises(ValueError):
665665
Config.TABLE.put(ROW_KEY1, row1_data)
666666

667667
def test_put_not_encoded_column_family(self):
668-
value1 = 'hello world!'.encode('utf-8')
669-
col1 = 'col1:greetings'
668+
value1 = "hello world!".encode("utf-8")
669+
col1 = "col1:greetings"
670670
row1_data = {col1: value1}
671671
# Need to clean-up row1 after, in case it doesn't fail.
672672
self.rows_to_delete.append(ROW_KEY1)
673-
673+
674674
with self.assertRaises(ValueError):
675675
Config.TABLE.put(ROW_KEY1, row1_data)
676676

0 commit comments

Comments
 (0)