Skip to content

Commit

Permalink
Clean up config files (#1031)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Oct 15, 2022
1 parent 712c453 commit fc0ac32
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 22 deletions.
17 changes: 0 additions & 17 deletions .flake8

This file was deleted.

7 changes: 4 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,11 @@ repos:
exclude: docs/source/other/full-config.rst
stages: [manual]

- repo: https://github.com/pycqa/flake8
rev: 5.0.4
- repo: https://github.com/john-hen/Flake8-pyproject
rev: 1.0.1
hooks:
- id: flake8
- id: Flake8-pyproject
alias: flake8
additional_dependencies:
["flake8-bugbear==22.6.22", "flake8-implicit-str-concat==0.2.0"]
stages: [manual]
Expand Down
File renamed without changes.
8 changes: 6 additions & 2 deletions examples/simple/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@
def get_data_files():
"""Get the data files for the package."""
data_files = [
("etc/jupyter/jupyter_server_config.d", "etc/jupyter/jupyter_server_config.d/", "*.json"),
(
"etc/jupyter/jupyter_server_config.d",
"etc/jupyter/jupyter_server_config.d/",
"*.json",
),
]

def add_data_files(path):
for (dirpath, dirnames, filenames) in os.walk(path):
for (dirpath, _, filenames) in os.walk(path):
if filenames:
paths = [(dirpath, dirpath, filename) for filename in filenames]
data_files.extend(paths)
Expand Down
19 changes: 19 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,22 @@ module = [
"websocket"
]
ignore_missing_imports = true


[tool.flake8]
ignore = ["E501", "W503", "E402"]
builtins = ["c", "get_config"]
exclude = [
".cache",
".github",
"docs"
]
enable-extensions = "G"
extend-ignore = [
"G001", "G002", "G004", "G200", "G201", "G202",
# black adds spaces around ':'
"E203"]
per-file-ignores = [
# B011: Do not call assert False since python -O removes these calls
# F841 local variable 'foo' is assigned to but never used
"tests/*: B011, F841"]

0 comments on commit fc0ac32

Please sign in to comment.