FinGraph / pyproject.toml
dev-yuje's picture
test: configure pytest pythonpath to resolve src module import errors
69ed12e
raw
history blame contribute delete
922 Bytes
# pyproject.toml
[tool.ruff]
line-length = 120
target-version = "py310"
preview = true
[tool.ruff.lint]
select = [
"E", # pycodestyle ๊ธฐ๋ณธ ๊ทœ์น™
"F", # pyflakes (๋ฏธ์‚ฌ์šฉ ๋ณ€์ˆ˜ ๋“ฑ)
"I", # isort (import ์ •๋ ฌ)
"N", # ๋„ค์ด๋ฐ ๊ทœ์น™
]
ignore = [
"E501", # Line too long (์ค„ ๊ธธ์ด ์ดˆ๊ณผ๋Š” ์ง€์‹ ๊ทธ๋ž˜ํ”„/ํ”„๋กฌํ”„ํŠธ ํŠน์„ฑ์ƒ ํ—ˆ์šฉ)
"N999", # Invalid module name (camelCase ํŒŒ์ผ๋ช… ํ—ˆ์šฉ)
"E402", # Module level import not at top of file (์Šคํฌ๋ฆฝํŠธ ์ค‘๊ฐ„ ์ž„ํฌํŠธ ํ—ˆ์šฉ)
"E722", # Do not use bare except (ํฌ๋กค๋Ÿฌ์˜ ํฌ๊ด„์  except ํ—ˆ์šฉ)
]
# ์ ˆ๋Œ€ import๋งŒ ํ—ˆ์šฉ (์ƒ๋Œ€ import ๊ธˆ์ง€)
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
# vulture๋กœ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” ์ฝ”๋“œ ํ™•์ธ
[tool.vulture]
min_confidence = 80
paths = ["src/"]
ignore_names = ["test_*", "setUp", "tearDown"]
[tool.pytest.ini_options]
pythonpath = [
"."
]