-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
pyproject.toml
137 lines (122 loc) · 3.56 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
[tool.poetry]
name = "hub"
version = "0.1.0"
description = "Hub for managing player information, membership, etc for India Ultimate"
authors = ["Puneeth Chaganti <punchagan@muse-amuse.in>"]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.10"
Django = "^4.2.1"
gunicorn = "^20.1.0"
django-ninja = "^0.22.2"
razorpay = "^1.3.0"
django-stubs-ext = "^4.2.2"
dj-database-url = "^2.1.0"
psycopg2 = "^2.9.7"
python-dateutil = "^2.8.2"
pyotp = "^2.9.0"
phonepe-sdk = {url = "https://muse-amuse.in/~punchagan/phonepe_sdk-1.1.0.tar.gz"} # Uploaded with updated urllib3 requirement to prevent conflicts
sentry-sdk = {extras = ["django"], version = "^1.34.0"}
prettytable = "^3.9.0"
pyjwt = "^2.8.0"
django-prometheus = "^2.3.1"
thefuzz = "^0.22.1"
pillow = "^10.2.0"
[tool.poetry.group.dev.dependencies]
ipython = "^8.13.2"
black = "^23.3.0"
ipdb = "^0.13.13"
beautifulsoup4 = "^4.12.2"
ruff = "^0.0.282"
pytest = "^7.4.0"
pytest-django = "^4.5.2"
mypy = "^1.4.1"
django-stubs = "^4.2.3"
types-requests = "^2.31.0.2"
selenium-base = "^4.17.2"
types-python-dateutil = "^2.8.19.14"
zulint = {git = "https://github.com/zulip/zulint.git"}
gitlint = "^0.19.1"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 100
[tool.ruff]
line-length = 100
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
# https://beta.ruff.rs/docs/rules/#tryceratops-try
select = [
"ANN", # annotations
"B", # bugbear
"C4", # comprehensions
"COM", # trailing comma
"DJ", # Django
"DTZ", # naive datetime
"E", # style errors
"EXE", # shebang
"F", # flakes
"FLY", # string formatting
"G", # logging format
"I", # import sorting
"INT", # gettext
"ISC", # string concatenation
"N", # naming
"PGH", # pygrep-hooks
"PIE", # miscellaneous
"PL", # pylint
"PYI", # typing stubs
"Q", # quotes
"RSE", # raise
"RUF", # Ruff
"S", # security
"SIM", # simplify
"T10", # debugger
"UP", # upgrade
"W", # style warnings
"YTT", # sys.version
]
ignore = [
"ANN101", # Missing type annotation for `self` in method
"ANN102", # Missing type annotation for `cls` in classmethod
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed
"COM812", # Trailing comma missing
"DJ001", # Avoid using `null=True` on string-based fields
"DJ008", # Model does not define `__str__` method
"E402", # Module level import not at top of file
"E501", # Line too long
"PLR0915", # Too many statements
"PLR0911", # Too many return statements
"PLR0912", # Too many branches
"PLR0913", # Too many arguments
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"S105", # Possible hardcoded password
]
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "hub.test_settings"
[tool.mypy]
scripts_are_modules = true
show_traceback = true
# Enable strict mode, with some exceptions.
strict = true
disallow_subclassing_any = false
disallow_untyped_calls = false
disallow_untyped_decorators = false
warn_return_any = false
# Enable optional errors.
enable_error_code = [
"redundant-expr",
"truthy-bool",
"ignore-without-code",
"unused-awaitable",
]
# Display the codes needed for # type: ignore[code] annotations.
show_error_codes = true
# Warn of unreachable or redundant code.
warn_unreachable = true
# To suppress all missing import errors for all untyped libraries
ignore_missing_imports = true
plugins = ["mypy_django_plugin.main"]
[tool.django-stubs]
django_settings_module = "hub.settings"