Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit fcb9e8f

Browse files
authored
Add files via upload
1 parent 3ca9c1c commit fcb9e8f

File tree

2 files changed

+63
-33
lines changed

2 files changed

+63
-33
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
default_language_version:
22
python: python3
33

4-
ci:
5-
skip: [pydocstyle, flake8]
6-
74
repos:
85
- repo: https://github.com/pre-commit/pre-commit-hooks
9-
rev: v4.3.0
6+
rev: v4.4.0
107
hooks:
118
# list of supported hooks: https://pre-commit.com/hooks.html
129
- id: trailing-whitespace
@@ -15,43 +12,20 @@ repos:
1512
- id: detect-private-key
1613

1714
# python code formatting/linting
18-
- repo: https://github.com/PyCQA/pydocstyle
19-
rev: 6.1.1
20-
hooks:
21-
- id: pydocstyle
22-
args:
23-
[
24-
--convention=google,
25-
"--add-ignore=D200,D202,D210,D212,D415",
26-
"nowcasting_dataset",
27-
]
28-
- repo: https://github.com/PyCQA/flake8
29-
rev: 4.0.1
15+
- repo: https://github.com/charliermarsh/ruff-pre-commit
16+
# Ruff version.
17+
rev: "v0.0.253"
3018
hooks:
31-
- id: flake8
32-
args:
33-
[
34-
--max-line-length,
35-
"100",
36-
--extend-ignore=E203,
37-
--per-file-ignores,
38-
"__init__.py:F401",
39-
"nowcasting_dataset",
40-
]
41-
- repo: https://github.com/PyCQA/isort
42-
rev: 5.10.1
43-
hooks:
44-
- id: isort
45-
args: [--profile, black, --line-length, "100", "nowcasting_dataset"]
19+
- id: ruff
20+
args: [--fix]
4621
- repo: https://github.com/psf/black
4722
rev: 22.6.0
4823
hooks:
4924
- id: black
5025
args: [--line-length, "100"]
51-
5226
# yaml formatting
5327
- repo: https://github.com/pre-commit/mirrors-prettier
54-
rev: v2.7.1
28+
rev: v3.0.0-alpha.4
5529
hooks:
5630
- id: prettier
5731
types: [yaml]

.ruff.toml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
2+
select = ["E", "F", "D", "I"]
3+
ignore = ["D200","D202","D210","D212","D415","D105",]
4+
5+
# Allow autofix for all enabled rules (when `--fix`) is provided.
6+
fixable = ["A", "B", "C", "D", "E", "F", "I"]
7+
unfixable = []
8+
9+
# Exclude a variety of commonly ignored directories.
10+
exclude = [
11+
".bzr",
12+
".direnv",
13+
".eggs",
14+
".git",
15+
".hg",
16+
".mypy_cache",
17+
".nox",
18+
".pants.d",
19+
".pytype",
20+
".ruff_cache",
21+
".svn",
22+
".tox",
23+
".venv",
24+
"__pypackages__",
25+
"_build",
26+
"buck-out",
27+
"build",
28+
"dist",
29+
"node_modules",
30+
"venv",
31+
"tests",
32+
]
33+
34+
# Same as Black.
35+
line-length = 100
36+
37+
# Allow unused variables when underscore-prefixed.
38+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
39+
40+
# Assume Python 3.10.
41+
target-version = "py310"
42+
fix = false
43+
# Group violations by containing file.
44+
format = "github"
45+
ignore-init-module-imports = true
46+
47+
[mccabe]
48+
# Unlike Flake8, default to a complexity level of 10.
49+
max-complexity = 10
50+
51+
[pydocstyle]
52+
# Use Google-style docstrings.
53+
convention = "google"
54+
55+
[per-file-ignores]
56+
"__init__.py" = ["F401", "E402"]

0 commit comments

Comments
 (0)