Skip to content

Commit 294c924

Browse files
authored
Formatting with black (#204)
* black config fixups and config * black reformatting * move stickler to black * add black logo * logo typo
1 parent 9e623fb commit 294c924

19 files changed

+1670
-1107
lines changed

.stickler.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
linters:
2-
flake8:
3-
max-line-length: 79
4-
fixer: true
5-
ignore:
6-
files:
7-
ignore:
8-
- doc/**/*.py
9-
fixers:
10-
enable: true
2+
black:
3+
config: ./pyproject.toml
4+
fixer: true

README.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
pandas-gbq
22
==========
33

4-
|Build Status| |Version Status| |Coverage Status|
4+
|Build Status| |Version Status| |Coverage Status| |Black Formatted|
55

66
**pandas-gbq** is a package providing an interface to the Google BigQuery API from pandas
77

@@ -43,3 +43,5 @@ See the `pandas-gbq documentation <https://pandas-gbq.readthedocs.io/>`_ for mor
4343
:target: https://pypi.python.org/pypi/pandas-gbq/
4444
.. |Coverage Status| image:: https://img.shields.io/codecov/c/github/pydata/pandas-gbq.svg
4545
:target: https://codecov.io/gh/pydata/pandas-gbq/
46+
.. |Black Formatted| image:: https://img.shields.io/badge/code%20style-black-000000.svg
47+
:target: https://github.com/ambv/black

nox.py

Lines changed: 43 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -8,101 +8,99 @@
88

99
import nox
1010

11-
1211
PANDAS_PRE_WHEELS = (
13-
'https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83'
14-
'.ssl.cf2.rackcdn.com')
12+
"https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83"
13+
".ssl.cf2.rackcdn.com"
14+
)
1515

1616

1717
@nox.session
1818
def default(session):
19-
session.install('mock', 'pytest', 'pytest-cov')
20-
session.install('-e', '.')
19+
session.install("mock", "pytest", "pytest-cov")
20+
session.install("-e", ".")
2121

2222
# Skip local auth tests on Travis.
2323
additional_args = list(session.posargs)
24-
if 'TRAVIS_BUILD_DIR' in os.environ:
25-
additional_args = additional_args + [
26-
'-m',
27-
'not local_auth',
28-
]
24+
if "TRAVIS_BUILD_DIR" in os.environ:
25+
additional_args = additional_args + ["-m", "not local_auth"]
2926

3027
session.run(
31-
'pytest',
32-
os.path.join('.', 'tests'),
33-
'--quiet',
34-
'--cov=pandas_gbq',
35-
'--cov=tests.unit',
36-
'--cov-report',
37-
'xml:/tmp/pytest-cov.xml',
28+
"pytest",
29+
os.path.join(".", "tests"),
30+
"--quiet",
31+
"--cov=pandas_gbq",
32+
"--cov=tests.unit",
33+
"--cov-report",
34+
"xml:/tmp/pytest-cov.xml",
3835
*additional_args
3936
)
4037

4138

4239
@nox.session
4340
def unit(session):
44-
session.install('mock', 'pytest', 'pytest-cov')
45-
session.install('-e', '.')
41+
session.install("mock", "pytest", "pytest-cov")
42+
session.install("-e", ".")
4643
session.run(
47-
'pytest',
48-
os.path.join('.', 'tests', 'unit'),
49-
'--quiet',
50-
'--cov=pandas_gbq',
51-
'--cov=tests.unit',
52-
'--cov-report',
53-
'xml:/tmp/pytest-cov.xml',
44+
"pytest",
45+
os.path.join(".", "tests", "unit"),
46+
"--quiet",
47+
"--cov=pandas_gbq",
48+
"--cov=tests.unit",
49+
"--cov-report",
50+
"xml:/tmp/pytest-cov.xml",
5451
*session.posargs
5552
)
5653

5754

5855
@nox.session
5956
def test27(session):
60-
session.interpreter = 'python2.7'
57+
session.interpreter = "python2.7"
6158
session.install(
62-
'-r', os.path.join('.', 'ci', 'requirements-2.7-0.19.2.pip'))
59+
"-r", os.path.join(".", "ci", "requirements-2.7-0.19.2.pip")
60+
)
6361
default(session)
6462

6563

6664
@nox.session
6765
def test35(session):
68-
session.interpreter = 'python3.5'
66+
session.interpreter = "python3.5"
6967
session.install(
70-
'-r', os.path.join('.', 'ci', 'requirements-3.5-0.18.1.pip'))
68+
"-r", os.path.join(".", "ci", "requirements-3.5-0.18.1.pip")
69+
)
7170
default(session)
7271

7372

7473
@nox.session
7574
def test36(session):
76-
session.interpreter = 'python3.6'
75+
session.interpreter = "python3.6"
7776
session.install(
78-
'-r', os.path.join('.', 'ci', 'requirements-3.6-0.20.1.conda'))
77+
"-r", os.path.join(".", "ci", "requirements-3.6-0.20.1.conda")
78+
)
7979
default(session)
8080

8181

8282
@nox.session
8383
def test36master(session):
84-
session.interpreter = 'python3.6'
84+
session.interpreter = "python3.6"
8585
session.install(
86-
'--pre',
87-
'--upgrade',
88-
'--timeout=60',
89-
'-f', PANDAS_PRE_WHEELS,
90-
'pandas')
86+
"--pre", "--upgrade", "--timeout=60", "-f", PANDAS_PRE_WHEELS, "pandas"
87+
)
9188
session.install(
92-
'-r', os.path.join('.', 'ci', 'requirements-3.6-MASTER.pip'))
89+
"-r", os.path.join(".", "ci", "requirements-3.6-MASTER.pip")
90+
)
9391
default(session)
9492

9593

9694
@nox.session
9795
def lint(session):
98-
session.install('flake8')
99-
session.run('flake8', 'pandas_gbq', 'tests', '-v')
96+
session.install("flake8")
97+
session.run("flake8", "pandas_gbq", "tests", "-v")
10098

10199

102100
@nox.session
103101
def cover(session):
104-
session.interpreter = 'python3.5'
102+
session.interpreter = "python3.5"
105103

106-
session.install('coverage', 'pytest-cov')
107-
session.run('coverage', 'report', '--show-missing', '--fail-under=40')
108-
session.run('coverage', 'erase')
104+
session.install("coverage", "pytest-cov")
105+
session.run("coverage", "report", "--show-missing", "--fail-under=40")
106+
session.run("coverage", "erase")

pandas_gbq/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
from .gbq import to_gbq, read_gbq # noqa
22

33
from ._version import get_versions
4+
45
versions = get_versions()
5-
__version__ = versions.get('closest-tag', versions['version'])
6-
__git_revision__ = versions['full-revisionid']
6+
__version__ = versions.get("closest-tag", versions["version"])
7+
__git_revision__ = versions["full-revisionid"]
78
del get_versions, versions

0 commit comments

Comments
 (0)