@@ -29,7 +29,6 @@ warn_unreachable = true
29
29
show_error_codes = true
30
30
implicit_reexport = true
31
31
# strict = true
32
-
33
32
# TODO: Remove when 'gitdb' is fully annotated.
34
33
exclude = [" ^git/ext/gitdb" ]
35
34
[[tool .mypy .overrides ]]
@@ -47,3 +46,40 @@ omit = ["*/git/ext/*"]
47
46
line-length = 120
48
47
target-version = [" py37" ]
49
48
extend-exclude = " git/ext/gitdb"
49
+
50
+ [tool .ruff ]
51
+ target-version = " py37"
52
+ line-length = 120
53
+ # Exclude a variety of commonly ignored directories.
54
+ exclude = [
55
+ " git/ext/" ,
56
+ " doc" ,
57
+ " build" ,
58
+ " dist" ,
59
+ ]
60
+ # Enable Pyflakes `E` and `F` codes by default.
61
+ lint.select = [
62
+ " E" ,
63
+ " W" , # see: https://pypi.org/project/pycodestyle
64
+ " F" , # see: https://pypi.org/project/pyflakes
65
+ # "I", #see: https://pypi.org/project/isort/
66
+ # "S", # see: https://pypi.org/project/flake8-bandit
67
+ # "UP", # see: https://docs.astral.sh/ruff/rules/#pyupgrade-up
68
+ ]
69
+ lint.extend-select = [
70
+ " A" , # see: https://pypi.org/project/flake8-builtins
71
+ " B" , # see: https://pypi.org/project/flake8-bugbear
72
+ " C4" , # see: https://pypi.org/project/flake8-comprehensions
73
+ " TCH004" , # see: https://docs.astral.sh/ruff/rules/runtime-import-in-type-checking-block/
74
+ ]
75
+ lint.ignore = [
76
+ " E203" , " W503"
77
+ ]
78
+ lint.ignore-init-module-imports = true
79
+ lint.unfixable = [" F401" ]
80
+
81
+ # [tool.ruff.lint.per-file-ignores]
82
+ # "setup.py" = ["ANN202", "ANN401"]
83
+ # "docs/source/conf.py" = ["A001", "D103"]
84
+ # "src/**" = ["ANN401"]
85
+ # "tests/**" = ["S101", "ANN001", "ANN201", "ANN202", "ANN401"]
0 commit comments