-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
127 lines (107 loc) · 2.32 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
[project]
name = "finch-api"
version = "0.2.2"
description = "Client library for the Finch API"
readme = "README.md"
license = "Apache-2.0"
authors = [
{ name = "Finch", email = "[email protected]" },
]
dependencies = [
"httpx>=0.23.0, <1",
"pydantic>=1.9.0, <3",
"typing-extensions>=4.5, <5",
"anyio>=3.5.0, <4",
"distro>=1.7.0, <2",
]
requires-python = ">= 3.7"
[project.urls]
Homepage = "https://github.com/Finch-API/finch-api-python"
Repository = "https://github.com/Finch-API/finch-api-python"
[tool.rye]
managed = true
dev-dependencies = [
"pyright==1.1.332",
"mypy==1.4.1",
"black==23.3.0",
"respx==0.19.2",
"pytest==7.1.1",
"pytest-asyncio==0.21.1",
"ruff==0.0.282",
"isort==5.10.1",
"time-machine==2.9.0",
"nox==2023.4.22",
]
[tool.rye.scripts]
format = { chain = [
"format:black",
"format:docs",
"format:ruff",
"format:isort",
]}
"format:black" = "black ."
"format:docs" = "python bin/blacken-docs.py README.md api.md"
"format:ruff" = "ruff --fix ."
"format:isort" = "isort ."
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build]
include = [
"src/*"
]
[tool.hatch.build.targets.wheel]
packages = ["src/finch"]
[tool.black]
line-length = 120
target-version = ["py37"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--tb=short"
xfail_strict = true
asyncio_mode = "auto"
filterwarnings = [
"error"
]
[tool.pyright]
# this enables practically every flag given by pyright.
# there are a couple of flags that are still disabled by
# default in strict mode as they are experimental and niche.
typeCheckingMode = "strict"
pythonVersion = "3.7"
exclude = [
"_dev",
".venv",
".nox",
]
reportImportCycles = false
reportPrivateUsage = false
[tool.isort]
profile = "black"
length_sort = true
extra_standard_library = ["typing_extensions"]
[tool.ruff]
line-length = 120
format = "grouped"
target-version = "py37"
select = [
# remove unused imports
"F401",
# bare except statements
"E722",
# unused arguments
"ARG",
# print statements
"T201",
"T203",
]
unfixable = [
# disable auto fix for print statements
"T201",
"T203",
]
ignore-init-module-imports = true
[tool.ruff.per-file-ignores]
"bin/**.py" = ["T201", "T203"]
"tests/**.py" = ["T201", "T203"]
"examples/**.py" = ["T201", "T203"]