-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
77 lines (68 loc) · 2.38 KB
/
pyproject.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
[tool.poetry]
name = ""
version = "0.1.0"
description = ""
authors = [""]
readme = "README.md"
packages = [{include = ""}]
[tool.poetry.dependencies]
python = "^3.10"
numpy = "^1.24.2"
websocket-client = "^1.5.1"
requests = "^2.28.2"
opencv-python = "^4.7.0.68"
pillow = "^9.4.0"
pathlib = "^1.0.1"
tqdm = "^4.64.1"
wandb = "^0.13.10"
scikit-learn = "^1.2.1"
torch = "^1.13.1"
torchvision = "^0.14.1"
torchaudio = "^0.13.1"
hydra-core = "^1.3.1"
[tool.poetry.group.dev.dependencies]
pyproject-flake8 = "5.0.4"
black = "^23.1.0"
isort = "^5.12.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.mypy]
# エラー時のメッセージを詳細表示
show_error_context = true
# エラー発生箇所の行数/列数を表示
show_column_numbers = true
# import 先のチェックを行わない (デフォルトだとサードパーティーライブラリまでチェックする)
ignore_missing_imports = true
# 関数定義の引数/戻り値に型アノテーション必須
disallow_untyped_defs = true
# デフォルト引数に None を取る場合型アノテーションに Optional 必須
no_implicit_optional = true
# 戻り値が Any 型ではない関数の戻り値の型アノテーションが Any のとき警告
warn_return_any = true
# mypy エラーに該当しない箇所に `# type: ignore` コメントが付与されていたら警告
# ※ `# type: ignore` が付与されている箇所は mypy のエラーを無視出来る
warn_unused_ignores = true
# 冗長なキャストに警告
warn_redundant_casts = true
[tool.black]
line-length = 79
[tool.isort]
profile = "black"
line_length = 79
# 各ライブラリ群の説明を追記する
import_heading_stdlib = "Standard Library"
import_heading_thirdparty = "Third Party Library"
import_heading_firstparty = "First Party Library"
import_heading_localfolder = "Local Library"
# from third_party import lib1, lib2...のような記述時の改行方法の設定(https://pycqa.github.io/isort/docs/configuration/multi_line_output_modes.html)
multi_line_output = 3
# 最後の要素の末尾に","を付けるようにする設定
include_trailing_comma = true
[tool.flake8]
max-line-length = 79
# E203: ":"の前の空白を入れないルール
# W503: 演算子の前に改行しないようにするルール
extend-ignore = ["E203", "W503"]
exclude = [".venv", ".git", "__pycache__",]
max-complexity = 10