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

Commit c810506

Browse files
authored
Add files via upload
1 parent ed67701 commit c810506

File tree

2 files changed

+65
-33
lines changed

2 files changed

+65
-33
lines changed

.pre-commit-config.yaml

Lines changed: 9 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,31 @@
11
default_language_version:
2-
python: python3.9
2+
python: python3
33

44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v4.3.0
6+
rev: v4.4.0
77
hooks:
88
# list of supported hooks: https://pre-commit.com/hooks.html
99
- id: trailing-whitespace
1010
- id: end-of-file-fixer
11-
- id: check-yaml
1211
- id: debug-statements
1312
- id: detect-private-key
1413

1514
# python code formatting/linting
16-
- repo: https://github.com/PyCQA/pydocstyle
17-
rev: 6.1.1
15+
- repo: https://github.com/charliermarsh/ruff-pre-commit
16+
# Ruff version.
17+
rev: "v0.0.253"
1818
hooks:
19-
- id: pydocstyle
20-
args:
21-
[
22-
--convention=google,
23-
"--add-ignore=D200,D202,D210,D212,D415",
24-
"nowcasting_utils",
25-
]
26-
- repo: https://github.com/PyCQA/flake8
27-
rev: 5.0.4
28-
hooks:
29-
- id: flake8
30-
args:
31-
[
32-
--max-line-length,
33-
"100",
34-
--extend-ignore=E203,
35-
--per-file-ignores,
36-
"__init__.py:F401",
37-
"nowcasting_utils",
38-
]
39-
- repo: https://github.com/PyCQA/isort
40-
rev: 5.10.1
41-
hooks:
42-
- id: isort
43-
args: [--profile, black, --line-length, "100", "nowcasting_utils"]
19+
- id: ruff
20+
args: [--fix]
4421
- repo: https://github.com/psf/black
45-
rev: 22.8.0
22+
rev: 22.6.0
4623
hooks:
4724
- id: black
4825
args: [--line-length, "100"]
49-
5026
# yaml formatting
5127
- repo: https://github.com/pre-commit/mirrors-prettier
52-
rev: v3.0.0-alpha.0
28+
rev: v3.0.0-alpha.4
5329
hooks:
5430
- id: prettier
5531
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)