Skip to content

Commit fc0ac32

Browse files
authored
Clean up config files (#1031)
1 parent 712c453 commit fc0ac32

File tree

5 files changed

+29
-22
lines changed

5 files changed

+29
-22
lines changed

.flake8

Lines changed: 0 additions & 17 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,11 @@ repos:
6060
exclude: docs/source/other/full-config.rst
6161
stages: [manual]
6262

63-
- repo: https://github.com/pycqa/flake8
64-
rev: 5.0.4
63+
- repo: https://github.com/john-hen/Flake8-pyproject
64+
rev: 1.0.1
6565
hooks:
66-
- id: flake8
66+
- id: Flake8-pyproject
67+
alias: flake8
6768
additional_dependencies:
6869
["flake8-bugbear==22.6.22", "flake8-implicit-str-concat==0.2.0"]
6970
stages: [manual]
File renamed without changes.

examples/simple/setup.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,15 @@
99
def get_data_files():
1010
"""Get the data files for the package."""
1111
data_files = [
12-
("etc/jupyter/jupyter_server_config.d", "etc/jupyter/jupyter_server_config.d/", "*.json"),
12+
(
13+
"etc/jupyter/jupyter_server_config.d",
14+
"etc/jupyter/jupyter_server_config.d/",
15+
"*.json",
16+
),
1317
]
1418

1519
def add_data_files(path):
16-
for (dirpath, dirnames, filenames) in os.walk(path):
20+
for (dirpath, _, filenames) in os.walk(path):
1721
if filenames:
1822
paths = [(dirpath, dirpath, filename) for filename in filenames]
1923
data_files.extend(paths)

pyproject.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,22 @@ module = [
179179
"websocket"
180180
]
181181
ignore_missing_imports = true
182+
183+
184+
[tool.flake8]
185+
ignore = ["E501", "W503", "E402"]
186+
builtins = ["c", "get_config"]
187+
exclude = [
188+
".cache",
189+
".github",
190+
"docs"
191+
]
192+
enable-extensions = "G"
193+
extend-ignore = [
194+
"G001", "G002", "G004", "G200", "G201", "G202",
195+
# black adds spaces around ':'
196+
"E203"]
197+
per-file-ignores = [
198+
# B011: Do not call assert False since python -O removes these calls
199+
# F841 local variable 'foo' is assigned to but never used
200+
"tests/*: B011, F841"]

0 commit comments

Comments
 (0)