1
1
# Enable rules.
2
2
select = [
3
- " A" , # flake8-builtins - https://beta.ruff.rs/docs/rules/#flake8-builtins-a
4
- " B" , # flake8-bugbear-b - https://beta.ruff.rs/docs/rules/#flake8-bugbear-b
5
- " C4" , # flake8-comprehensions - https://beta.ruff.rs/docs/rules/#flake8-comprehensions-c4
3
+ " A" , # flake8-builtins - https://beta.ruff.rs/docs/rules/#flake8-builtins-a
4
+ " B" , # flake8-bugbear-b - https://beta.ruff.rs/docs/rules/#flake8-bugbear-b
5
+ " C4" , # flake8-comprehensions - https://beta.ruff.rs/docs/rules/#flake8-comprehensions-c4
6
6
" C90" , # mccabe - https://beta.ruff.rs/docs/rules/#mccabe-c90
7
7
" COM" , # flak8-commas - https://beta.ruff.rs/docs/rules/#flake8-commas-com
8
8
# "D", # pydocstyle - not enabled temporarily
9
- " E" , # pycodestyle error - https://beta.ruff.rs/docs/rules/#error-e
9
+ " E" , # pycodestyle error - https://beta.ruff.rs/docs/rules/#error-e
10
10
" ERA" , # flake8-eradicate - https://beta.ruff.rs/docs/rules/#eradicate-era
11
- " FA" , # flake8-future-annotations - https://beta.ruff.rs/docs/rules/#flake8-future-annotations-fa
11
+ " FA" , # flake8-future-annotations - https://beta.ruff.rs/docs/rules/#flake8-future-annotations-fa
12
12
" FIX" , # flake8-fixme - https://beta.ruff.rs/docs/rules/#flake8-fixme-fix
13
- " F" , # pyflakes - https://beta.ruff.rs/docs/rules/#pyflakes-f
14
- " I" , # isort - https://beta.ruff.rs/docs/rules/#isort-i
13
+ " F" , # pyflakes - https://beta.ruff.rs/docs/rules/#pyflakes-f
14
+ " I" , # isort - https://beta.ruff.rs/docs/rules/#isort-i
15
15
" ICN" , # flake8-import-conventions - https://beta.ruff.rs/docs/rules/#flake8-import-conventions-icn
16
16
" ISC" , # flake8-implicit-str-concat - https://beta.ruff.rs/docs/rules/#flake8-implicit-str-concat-isc
17
17
" PLE" , # pylint error - https://beta.ruff.rs/docs/rules/#error-ple
18
18
" PLC" , # pylint convention - https://beta.ruff.rs/docs/rules/#convention-plc
19
19
" PLR" , # pylint refactoring - https://beta.ruff.rs/docs/rules/#refactor-plr
20
20
" PLW" , # pylint warning - https://beta.ruff.rs/docs/rules/#warning-plw
21
- " PL" , # pylint - https://beta.ruff.rs/docs/rules/#pylint-pl
21
+ " PL" , # pylint - https://beta.ruff.rs/docs/rules/#pylint-pl
22
22
" PYI" , # flake8-pyi - https://beta.ruff.rs/docs/rules/#flake8-pyi-pyi
23
- " Q" , # flake8-quotes - https://beta.ruff.rs/docs/rules/#flake8-quotes-q
23
+ " Q" , # flake8-quotes - https://beta.ruff.rs/docs/rules/#flake8-quotes-q
24
24
" PTH" , # flake8-use-pathlib - https://beta.ruff.rs/docs/rules/#flake8-use-pathlib-pth
25
25
" T10" , # flake8-debugger https://beta.ruff.rs/docs/rules/#flake8-debugger-t10
26
- " TD" , # flake8-todo - https://beta.ruff.rs/docs/rules/#flake8-todos-td
27
- " W" # pycodestyle warning - https://beta.ruff.rs/docs/rules/#warning-w
26
+ " TD" , # flake8-todo - https://beta.ruff.rs/docs/rules/#flake8-todos-td
27
+ " W" , # pycodestyle warning - https://beta.ruff.rs/docs/rules/#warning-w
28
28
]
29
29
30
30
# Ignore specific rules
31
31
ignore = [
32
- " W291" , # https://beta.ruff.rs/docs/rules/trailing-whitespace/
32
+ " W291" , # https://beta.ruff.rs/docs/rules/trailing-whitespace/
33
33
" PLR0913" , # https://beta.ruff.rs/docs/rules/too-many-arguments/
34
34
" PLR2004" , # https://beta.ruff.rs/docs/rules/magic-value-comparison/
35
35
" PLW0603" , # https://beta.ruff.rs/docs/rules/global-statement/
36
- " B904" , # raise-without-from-inside-except - disabled temporarily
36
+ " B904" , # raise-without-from-inside-except - disabled temporarily
37
37
" PLC1901" , # Compare-to-empty-string - disabled temporarily
38
38
" PYI024" ,
39
- " FA100" # Enable this rule when drop support to Python 3.7
40
- ]
39
+ " FA100" , # Enable this rule when drop support to Python 3.7
40
+ ]
41
41
42
42
# Exclude files and directories
43
- exclude = [" docs" , " .eggs" , " setup.py" , " example" , " .aws-sam" , " .git" , " dist" , " .md" , " .yaml" , " example/samconfig.toml" , " .txt" , " .ini" ]
43
+ exclude = [
44
+ " docs" ,
45
+ " .eggs" ,
46
+ " setup.py" ,
47
+ " example" ,
48
+ " .aws-sam" ,
49
+ " .git" ,
50
+ " dist" ,
51
+ " .md" ,
52
+ " .yaml" ,
53
+ " example/samconfig.toml" ,
54
+ " .txt" ,
55
+ " .ini" ,
56
+ ]
44
57
45
58
# Maximum line length
46
59
line-length = 120
@@ -50,7 +63,10 @@ fix = true
50
63
fixable = [" I" , " COM812" , " W" ]
51
64
52
65
# See: https://github.com/astral-sh/ruff/issues/128
53
- typing-modules = [" aws_lambda_powertools.utilities.parser.types" ]
66
+ typing-modules = [
67
+ " aws_lambda_powertools.utilities.parser.types" ,
68
+ " aws_lambda_powertools.shared.types" ,
69
+ ]
54
70
55
71
[mccabe ]
56
72
# Maximum cyclomatic complexity
0 commit comments