-
Notifications
You must be signed in to change notification settings - Fork 152
/
pyproject.toml
127 lines (107 loc) · 3.41 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
[build-system]
requires = ["setuptools", "setuptools-scm", "PyYaml"]
build-backend = "setuptools.build_meta"
[project]
name = "ua-parser"
description = "Python port of Browserscope's user agent parser"
version = "1.0.0a1"
readme = "README.rst"
requires-python = ">=3.9"
dependencies = []
license = {text = "Apache 2.0"}
urls = {repository = "https://github.com/ua-parser/uap-python"}
authors = [
{ name = "Stephen Lamm", email = "slamm@google.com"},
{ name = "PBS", email = "no-reply@pbs.org" },
{ name = "Selwin Ong", email = "selwin.ong@gmail.com" },
{ name = "Matt Robenolt", email = "matt@ydekproductions.com" },
{ name = "Lindsey Simon", email = "lsimon@commoner.com" },
]
maintainers = [
{ name = "masklinn", email = "uap@masklinn.net" }
]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
# no graalpy classifier yet (pypa/trove-classifiers#188)
# "Programming Language :: Python :: Implementation :: GraalPy",
]
[project.optional-dependencies]
yaml = ["PyYaml"]
re2 = ["google-re2"]
regex = ["ua-parser-rs"]
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
"ua_parser" = ["py.typed"]
[tool.ruff]
exclude = [
"src/ua_parser/_lazy.py",
"src/ua_parser/_matchers.py",
]
[tool.ruff.lint]
select = ["F", "E", "W", "I", "RET", "RUF", "PT"]
ignore = [
"RET505", # elif after return
"E501", # line too long, formatter should take care of the fixable ones
"E721", # I'll compare types with `is` if I want
]
[tool.ruff.lint.isort]
classes = ["OS"]
known-first-party = ["ua_parser"]
combine-as-imports = true
[tool.mypy]
python_version = "3.9"
files = "src,tests"
# can't use strict because it's only global
# these two are global
warn_unused_configs = true
warn_redundant_casts = true
# these can be overridden (maybe?)
strict_equality = true
# strict_concatenate = true
check_untyped_defs = true
disallow_subclassing_any = true
disallow_untyped_decorators = true
disallow_any_generics = true
disallow_untyped_calls = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
no_implicit_reexport = true
warn_return_any = true
[[tool.mypy.overrides]]
module = "ua_parser.user_agent_parser"
#check_untyped_defs = false
disallow_untyped_calls = false
#disallow_incomplete_defs = false
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = [
"test_core",
"test_caches",
"test_parsers_basics",
"test_fa_simplifier",
]
#check_untyped_defs = false
#disallow_untyped_calls = false
#disallow_incomplete_defs = false
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = "test_legacy"
#check_untyped_defs = false
disallow_untyped_calls = false
#disallow_incomplete_defs = false
disallow_untyped_defs = false