@@ -29,7 +29,6 @@ warn_unreachable = true
2929show_error_codes = true
3030implicit_reexport = true
3131# strict = true
32-
3332# TODO: Remove when 'gitdb' is fully annotated.
3433exclude = [" ^git/ext/gitdb" ]
3534[[tool .mypy .overrides ]]
@@ -47,3 +46,40 @@ omit = ["*/git/ext/*"]
4746line-length = 120
4847target-version = [" py37" ]
4948extend-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