-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
136 lines (125 loc) · 4.69 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
[tool.poetry]
name = "stockholm"
version = "0.5.7"
description = "Human friendly and flexible package for working with monetary amounts"
authors = ["Carl Oscar Aaro <[email protected]>"]
homepage = "https://github.com/kalaspuff/stockholm"
repository = "https://github.com/kalaspuff/stockholm"
keywords = ["money", "monetary amount", "monetary value", "currency", "formatting", "protobuf", "protocol buffers", "graphql", "money graphql", "protobuf money", "protocol buffers money", "json", "python money", "monetary object", "python money class", "finance", "fintech"]
readme = "README.md"
license = "MIT"
classifiers = [
"Development Status :: 4 - Beta",
"Topic :: Software Development :: Libraries",
"Topic :: Office/Business :: Financial",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Intended Audience :: Developers",
"Intended Audience :: Financial and Insurance Industry",
"Typing :: Typed",
"License :: OSI Approved :: MIT License"
]
[tool.poetry.dependencies]
python = "^3.8"
protobuf = { version = ">=3.20.0,<5.0.0", optional = true }
typing-extensions = { version = ">=4.7.0", python = "<=3.10" }
[tool.poetry.dev-dependencies]
flake8 = { version = ">=3.8.4", markers = "sys_platform != \"win32\"" }
flake8-black = { version = ">=0.2.0", markers = "sys_platform != \"win32\"" }
flake8-isort = { version = ">=4.0.0", markers = "sys_platform != \"win32\"" }
flake8-pyproject = { version = ">=1.1.0", markers = "sys_platform != \"win32\"" }
isort = { version = ">=5.6.0", markers = "sys_platform != \"win32\"" }
pytest = { version = ">=6.1.0", markers = "sys_platform != \"win32\"" }
pytest-cov = { version = ">=2.10.0", markers = "sys_platform != \"win32\"" }
black = { version = "*", markers = "sys_platform != \"win32\"", allow-prereleases = true }
mypy = { version = ">=0.800", markers = "sys_platform != \"win32\"" }
codecov = { version = ">=2.1.10", markers = "sys_platform != \"win32\"" }
protobuf = { version = ">=3.20.0,<5.0.0", markers = "sys_platform != \"win32\"" }
types-protobuf = { version = ">=0.1.13", markers = "sys_platform != \"win32\"" }
setuptools = { version = ">=68.1.2", markers = "sys_platform != \"win32\"" }
pydantic = { version = ">=2.2", markers = "sys_platform != \"win32\"" }
[tool.poetry.extras]
protobuf = ["protobuf"]
[build-system]
requires = ["poetry_core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 120
target_version = ["py38", "py39", "py310", "py311"]
include = '\.pyi?$'
exclude = '\.eggs/|\.egg-info/|\.git/|\.github/|\.mypy_cache/|\.venv/|\.pytest_cache/|\.vscode/|__pycache__/|build/|dist/|setup\.py'
[tool.isort]
profile = "black"
line_length = 120
src_paths = ["stockholm", "tests"]
known_first_party = "stockholm"
skip = [".mypy_cache", ".pytest_cache", "__pycache__", "stockholm.egg-info", ".eggs", ".git", ".venv", ".vscode", "build", "dist", "tmp"]
[tool.ruff]
line-length = 120
target-version = "py38"
select = [
"F", # pyflakes
"E", # pycodestyle (erorr)
"I", # isort
"W", # pycodestyle (warning)
"C901", # complex-structure
"UP", # pyupgrade
"N", # pep8-naming
"B", # flake8-bugbear
"DTZ", # flake8-datetimez
"Q", # flake8-quotes
"T20", # flake8-print
"PL", # pylint
"PIE", # flake8-pie
"RET", # flake8-return
"SLF", # flake8-self
"SIM", # flake8-simplify
"PGH", # pygrep-hooks
"RUF", # ruff-specific
"PT", # flake8-pytest-style
"C4", # flake8-comprehensions
"A", # flake8-builtins
"BLE", # flake8-blind-except
"S", # flake8-bandit
]
ignore = [
"UP007", # union type annotations
]
src = [
"src",
"tests",
]
[tool.ruff.per-file-ignores]
"tests/**/*.py" = [
"S101", # assert
"I003", # isort
"PLR2004", # magic-value-comparison
]
[tool.mypy]
pretty = true
files = ["$MYPY_CONFIG_FILE_DIR/stockholm", "$MYPY_CONFIG_FILE_DIR/tests/types", "$MYPY_CONFIG_FILE_DIR/tests/examples"]
ignore_missing_imports = true
show_error_codes = true
no_implicit_reexport = true
no_implicit_optional = true
strict_equality = true
strict_optional = true
check_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
local_partial_types = true
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
warn_unreachable = true
[tool.flake8]
ignore = ["E203", "E501", "W503", "E231"]
exclude = ["stockholm.egg-info", ".git", ".mypy_cache", ".pytest_cache", ".venv", ".vscode", "__pycache__", "build", "dist", "tmp"]
[tool.coverage.run]
omit = ["tests/*"]