Skip to content

Commit 0390be2

Browse files
authored
Add flake8 and git-blame-ignore-revs (#6337)
1 parent a7717d9 commit 0390be2

File tree

5 files changed

+29
-22
lines changed

5 files changed

+29
-22
lines changed

.git-blame-ignore-revs

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Run auto-formatters: https://github.com/jupyter/notebook/pull/6335
2+
a7717d90f128368296fe3434deba5acd6031edab

.pre-commit-config.yaml

+10-10
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@ repos:
3333
files: \.py$
3434
args: [--profile=black]
3535

36-
# - repo: https://github.com/pycqa/flake8
37-
# rev: 4.0.1
38-
# hooks:
39-
# - id: flake8
40-
# additional_dependencies:
41-
# [
42-
# "flake8-bugbear==20.1.4",
43-
# "flake8-logging-format==0.6.0",
44-
# "flake8-implicit-str-concat==0.2.0",
45-
# ]
36+
- repo: https://github.com/pycqa/flake8
37+
rev: 4.0.1
38+
hooks:
39+
- id: flake8
40+
additional_dependencies:
41+
[
42+
"flake8-bugbear==20.1.4",
43+
"flake8-logging-format==0.6.0",
44+
"flake8-implicit-str-concat==0.2.0",
45+
]
4646

4747
- repo: https://github.com/sirosen/check-jsonschema
4848
rev: 0.10.2

docs/source/conf.py

+2-11
Original file line numberDiff line numberDiff line change
@@ -256,16 +256,7 @@
256256

257257
# -- Options for LaTeX output ---------------------------------------------
258258

259-
latex_elements = {
260-
# The paper size ('letterpaper' or 'a4paper').
261-
#'papersize': 'letterpaper',
262-
# The font size ('10pt', '11pt' or '12pt').
263-
#'pointsize': '10pt',
264-
# Additional stuff for the LaTeX preamble.
265-
#'preamble': '',
266-
# Latex figure (float) alignment
267-
#'figure_align': 'htbp',
268-
}
259+
latex_elements = {}
269260

270261
# Grouping the document tree into LaTeX files. List of tuples
271262
# (source start file, target name, title,
@@ -313,7 +304,7 @@
313304

314305
# -- Options for link checks ----------------------------------------------
315306

316-
linkcheck_ignore = ["http://127\.0\.0\.1/*"]
307+
linkcheck_ignore = [r"http://127\.0\.0\.1/*"]
317308

318309

319310
# -- Options for Texinfo output -------------------------------------------

notebook/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from ._version import __version__
1+
from ._version import __version__ # noqa
22

33

44
def _jupyter_server_extension_paths():

setup.cfg

+14
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,17 @@ test =
4949
[options.entry_points]
5050
console_scripts =
5151
jupyter-notebook = notebook.app:main
52+
53+
[flake8]
54+
ignore = E501, W503, E402
55+
builtins = c, get_config
56+
exclude =
57+
.cache,
58+
.github,
59+
docs,
60+
setup.py
61+
enable-extensions = G
62+
extend-ignore =
63+
G001, G002, G004, G200, G201, G202,
64+
# black adds spaces around ':'
65+
E203,

0 commit comments

Comments
 (0)