-
Notifications
You must be signed in to change notification settings - Fork 96
/
ruff.toml
84 lines (75 loc) · 1.93 KB
/
ruff.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
lint.select = [
# Pyflakes
"F",
# Pycodestyle
"E",
"W",
# flake8-docstrings
"D",
# isort
"I",
]
lint.ignore = [
# TODO: Fix these.
# Lines longer than line-length. This is generally handled by Black.
"E501",
# Missing docstring in public module
"D100",
# Missing docstring in public package
"D104",
# no-blank-line-before-class
"D211",
# First line should end with a period
"D400",
# First word of the docstring should not be "This"
"D404",
# First line of docstring should be in imperative mood
"D401",
# Missing argument descriptions in the docstring
"D417",
]
# Allow autofix for all enabled rules (when `--fix`) is provided.
lint.fixable = [
"A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM",
"ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF",
"SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"
]
lint.unfixable = []
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
line-length = 120
# Allow unused variables when underscore-prefixed.
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Assume Python 3.8, the lowest version that MF supports.
target-version = "py38"
[lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[lint.pydocstyle]
convention = "google"
[lint.isort]
required-imports = ["from __future__ import annotations"]
known-first-party = ["dbt_metricflow", "metricflow"]