hysts HF staff commited on
Commit
2e0e3aa
1 Parent(s): 1cfb0d6
Files changed (2) hide show
  1. .pre-commit-config.yaml +54 -49
  2. .vscode/settings.json +9 -4
.pre-commit-config.yaml CHANGED
@@ -1,50 +1,55 @@
1
  repos:
2
- - repo: https://github.com/pre-commit/pre-commit-hooks
3
- rev: v4.4.0
4
- hooks:
5
- - id: check-executables-have-shebangs
6
- - id: check-json
7
- - id: check-merge-conflict
8
- - id: check-shebang-scripts-are-executable
9
- - id: check-toml
10
- - id: check-yaml
11
- - id: end-of-file-fixer
12
- - id: mixed-line-ending
13
- args: ["--fix=lf"]
14
- - id: requirements-txt-fixer
15
- - id: trailing-whitespace
16
- - repo: https://github.com/myint/docformatter
17
- rev: v1.7.5
18
- hooks:
19
- - id: docformatter
20
- args: ["--in-place"]
21
- - repo: https://github.com/pycqa/isort
22
- rev: 5.12.0
23
- hooks:
24
- - id: isort
25
- args: ["--profile", "black"]
26
- - repo: https://github.com/pre-commit/mirrors-mypy
27
- rev: v1.5.1
28
- hooks:
29
- - id: mypy
30
- args: ["--ignore-missing-imports"]
31
- additional_dependencies: ["types-python-slugify", "types-requests", "types-PyYAML"]
32
- - repo: https://github.com/psf/black
33
- rev: 23.9.1
34
- hooks:
35
- - id: black
36
- language_version: python3.10
37
- args: ["--line-length", "119"]
38
- - repo: https://github.com/kynan/nbstripout
39
- rev: 0.6.1
40
- hooks:
41
- - id: nbstripout
42
- args: ["--extra-keys", "metadata.interpreter metadata.kernelspec cell.metadata.pycharm"]
43
- - repo: https://github.com/nbQA-dev/nbQA
44
- rev: 1.7.0
45
- hooks:
46
- - id: nbqa-black
47
- - id: nbqa-pyupgrade
48
- args: ["--py37-plus"]
49
- - id: nbqa-isort
50
- args: ["--float-to-top"]
 
 
 
 
 
 
1
  repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v4.5.0
4
+ hooks:
5
+ - id: check-executables-have-shebangs
6
+ - id: check-json
7
+ - id: check-merge-conflict
8
+ - id: check-shebang-scripts-are-executable
9
+ - id: check-toml
10
+ - id: check-yaml
11
+ - id: end-of-file-fixer
12
+ - id: mixed-line-ending
13
+ args: ["--fix=lf"]
14
+ - id: requirements-txt-fixer
15
+ - id: trailing-whitespace
16
+ - repo: https://github.com/myint/docformatter
17
+ rev: v1.7.5
18
+ hooks:
19
+ - id: docformatter
20
+ args: ["--in-place"]
21
+ - repo: https://github.com/pycqa/isort
22
+ rev: 5.13.1
23
+ hooks:
24
+ - id: isort
25
+ args: ["--profile", "black"]
26
+ - repo: https://github.com/pre-commit/mirrors-mypy
27
+ rev: v1.7.1
28
+ hooks:
29
+ - id: mypy
30
+ args: ["--ignore-missing-imports"]
31
+ additional_dependencies:
32
+ ["types-python-slugify", "types-requests", "types-PyYAML"]
33
+ - repo: https://github.com/psf/black
34
+ rev: 23.11.0
35
+ hooks:
36
+ - id: black
37
+ language_version: python3.10
38
+ args: ["--line-length", "119"]
39
+ - repo: https://github.com/kynan/nbstripout
40
+ rev: 0.6.1
41
+ hooks:
42
+ - id: nbstripout
43
+ args:
44
+ [
45
+ "--extra-keys",
46
+ "metadata.interpreter metadata.kernelspec cell.metadata.pycharm",
47
+ ]
48
+ - repo: https://github.com/nbQA-dev/nbQA
49
+ rev: 1.7.1
50
+ hooks:
51
+ - id: nbqa-black
52
+ - id: nbqa-pyupgrade
53
+ args: ["--py37-plus"]
54
+ - id: nbqa-isort
55
+ args: ["--float-to-top"]
.vscode/settings.json CHANGED
@@ -1,11 +1,16 @@
1
  {
 
 
2
  "[python]": {
3
  "editor.defaultFormatter": "ms-python.black-formatter",
4
  "editor.formatOnType": true,
5
  "editor.codeActionsOnSave": {
6
- "source.organizeImports": true
7
  }
8
  },
 
 
 
9
  "black-formatter.args": [
10
  "--line-length=119"
11
  ],
@@ -13,9 +18,9 @@
13
  "flake8.args": [
14
  "--max-line-length=119"
15
  ],
16
- "ruff.args": [
17
  "--line-length=119"
18
  ],
19
- "editor.formatOnSave": true,
20
- "files.insertFinalNewline": true
21
  }
 
1
  {
2
+ "editor.formatOnSave": true,
3
+ "files.insertFinalNewline": false,
4
  "[python]": {
5
  "editor.defaultFormatter": "ms-python.black-formatter",
6
  "editor.formatOnType": true,
7
  "editor.codeActionsOnSave": {
8
+ "source.organizeImports": "explicit"
9
  }
10
  },
11
+ "[jupyter]": {
12
+ "files.insertFinalNewline": false
13
+ },
14
  "black-formatter.args": [
15
  "--line-length=119"
16
  ],
 
18
  "flake8.args": [
19
  "--max-line-length=119"
20
  ],
21
+ "ruff.lint.args": [
22
  "--line-length=119"
23
  ],
24
+ "notebook.output.scrolling": true,
25
+ "notebook.formatOnCellExecution": true
26
  }