python-taxes 0.5.0__tar.gz → 0.6.0a3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_taxes-0.5.0 → python_taxes-0.6.0a3}/LICENSE +21 -21
- {python_taxes-0.5.0 → python_taxes-0.6.0a3}/PKG-INFO +11 -9
- {python_taxes-0.5.0 → python_taxes-0.6.0a3}/README.md +109 -109
- {python_taxes-0.5.0 → python_taxes-0.6.0a3}/pyproject.toml +130 -102
- {python_taxes-0.5.0 → python_taxes-0.6.0a3}/src/python_taxes/__init__.py +7 -7
- python_taxes-0.6.0a3/src/python_taxes/__main__.py +4 -0
- python_taxes-0.6.0a3/src/python_taxes/cli.py +147 -0
- {python_taxes-0.5.0 → python_taxes-0.6.0a3}/src/python_taxes/federal/__init__.py +19 -19
- {python_taxes-0.5.0 → python_taxes-0.6.0a3}/src/python_taxes/federal/income/__init__.py +4 -4
- {python_taxes-0.5.0 → python_taxes-0.6.0a3}/src/python_taxes/federal/income/payroll/automated.py +184 -174
- {python_taxes-0.5.0 → python_taxes-0.6.0a3}/src/python_taxes/federal/income/tables/percentage/__init__.py +15 -15
- {python_taxes-0.5.0 → python_taxes-0.6.0a3}/src/python_taxes/federal/income/tables/percentage/automated/hoh.py +309 -309
- {python_taxes-0.5.0 → python_taxes-0.6.0a3}/src/python_taxes/federal/income/tables/percentage/automated/married.py +309 -309
- {python_taxes-0.5.0 → python_taxes-0.6.0a3}/src/python_taxes/federal/income/tables/percentage/automated/single.py +309 -309
- {python_taxes-0.5.0 → python_taxes-0.6.0a3}/src/python_taxes/federal/medicare.py +91 -89
- {python_taxes-0.5.0 → python_taxes-0.6.0a3}/src/python_taxes/federal/social_security.py +55 -57
- {python_taxes-0.5.0 → python_taxes-0.6.0a3}/src/python_taxes/federal/income/payroll/__init__.py +0 -0
- {python_taxes-0.5.0 → python_taxes-0.6.0a3}/src/python_taxes/federal/income/tables/percentage/automated/__init__.py +0 -0
@@ -1,21 +1,21 @@
|
|
1
|
-
MIT License
|
2
|
-
|
3
|
-
Copyright (c) 2025 Stacy Noland
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2025 Stacy Noland
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: python-taxes
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.6.0a3
|
4
4
|
Summary: A Python library for calculating US Social Security, Medicare, and Federal Income taxes.
|
5
5
|
License: MIT License
|
6
6
|
|
@@ -24,7 +24,7 @@ License: MIT License
|
|
24
24
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
25
25
|
SOFTWARE.
|
26
26
|
Author: Stacy Noland
|
27
|
-
Author-email:
|
27
|
+
Author-email: stacy.noland@outlook.com
|
28
28
|
Requires-Python: >=3.10
|
29
29
|
Classifier: Development Status :: 4 - Beta
|
30
30
|
Classifier: Intended Audience :: Developers
|
@@ -38,21 +38,23 @@ Classifier: Programming Language :: Python :: 3.10
|
|
38
38
|
Classifier: Programming Language :: Python :: 3.11
|
39
39
|
Classifier: Programming Language :: Python :: 3.12
|
40
40
|
Classifier: Programming Language :: Python :: 3.13
|
41
|
-
Classifier: Typing :: Typed
|
42
41
|
Classifier: Topic :: Software Development :: Libraries
|
43
42
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
43
|
+
Classifier: Typing :: Typed
|
44
|
+
Provides-Extra: cli
|
44
45
|
Requires-Dist: pydantic (>=2.11.3,<3.0.0)
|
46
|
+
Requires-Dist: typer (>=0.15.0,<1.0.0) ; extra == "cli"
|
45
47
|
Project-URL: Homepage, https://github.com/stacynoland/python-taxes
|
46
48
|
Project-URL: Source, https://github.com/stacynoland/python-taxes
|
47
49
|
Description-Content-Type: text/markdown
|
48
50
|
|
49
51
|

|
50
|
-
](https://github.com/stacynoland/python-taxes/actions/workflows/tests.yml)
|
53
|
+

|
54
|
+

|
55
|
+
[](https://pypi.org/project/python-taxes/)
|
56
|
+

|
57
|
+
[](https://github.com/psf/black)
|
56
58
|
|
57
59
|
> Disclaimer: This library is not intended to be used for tax advice. Please consult a tax professional for any tax-related questions or concerns.
|
58
60
|
|
@@ -1,109 +1,109 @@
|
|
1
|
-

|
2
|
-
 # Returns the amount withheld for Social Security tax
|
37
|
-
|
38
|
-
social_security.withholding(
|
39
|
-
taxable_wages=3000,
|
40
|
-
taxable_wages_ytd=100000,
|
41
|
-
self_employed=False,
|
42
|
-
tax_year=2024,
|
43
|
-
rounded=True,
|
44
|
-
)
|
45
|
-
```
|
46
|
-
---
|
47
|
-
### Medicare Tax
|
48
|
-
|
49
|
-
To calculate Medicare tax, use the `medicare` module. There are two functions available:
|
50
|
-
|
51
|
-
`medicare.required_withholding` - Returns the required amount to withhold for Medicare tax regardless of filing status.
|
52
|
-
`medicare.additional_withholding` - Returns the amount that should be withheld based on filing status, including Additional Medicare tax.
|
53
|
-
|
54
|
-
```python
|
55
|
-
from python_taxes.federal import medicare
|
56
|
-
|
57
|
-
medicare.required_withholding(5000) # Returns the amount withheld for Medicare tax
|
58
|
-
|
59
|
-
medicare.required_withholding(
|
60
|
-
taxable_wages=5000,
|
61
|
-
taxable_wages_ytd=100000,
|
62
|
-
self_employed=True,
|
63
|
-
rounded=True,
|
64
|
-
)
|
65
|
-
|
66
|
-
medicare.additional_withholding(100000, "married") # Returns the amount withheld for Medicare Tax and Additional Medicare tax, if applicable, based on filing status.
|
67
|
-
|
68
|
-
medicare.additional_withholding(
|
69
|
-
taxable_wages_ytd=100000,
|
70
|
-
filing_status="married",
|
71
|
-
self_employed=False,
|
72
|
-
rounded=True,
|
73
|
-
)
|
74
|
-
```
|
75
|
-
---
|
76
|
-
### Federal Income Tax
|
77
|
-
|
78
|
-
To calculate Federal Income tax, use the `income` package. Currently, the only payroll withholding supported is for automated systems. Specifically, the percentage tables in IRS Publication 15-T section 1 (Percentage Method Tables for Automated Payroll Systems).
|
79
|
-
|
80
|
-
```python
|
81
|
-
from python_taxes.federal import income
|
82
|
-
|
83
|
-
income.employer_withholding(10000) # Returns the amount withheld for Federal Income tax
|
84
|
-
|
85
|
-
income.employer_withholding(
|
86
|
-
taxable_wages=10000,
|
87
|
-
pay_frequency="monthly",
|
88
|
-
filing_status="married",
|
89
|
-
multiple_jobs=False,
|
90
|
-
tax_credits=0,
|
91
|
-
other_income=0,
|
92
|
-
deductions=0,
|
93
|
-
extra_withholding=0,
|
94
|
-
tax_year=2024,
|
95
|
-
rounded=True,
|
96
|
-
)
|
97
|
-
|
98
|
-
income.employer_withholding_pre_2020(10000) # Returns the amount withheld for Federal Income tax - using this method is required if Form W-4 is from 2019 or earlier.
|
99
|
-
|
100
|
-
income.employer_withholding_pre_2020(
|
101
|
-
taxable_wages=10000,
|
102
|
-
pay_frequency="monthly",
|
103
|
-
marital_status="married",
|
104
|
-
allowances_claimed=0,
|
105
|
-
extra_withholding=0,
|
106
|
-
tax_year=2024,
|
107
|
-
rounded=False,
|
108
|
-
)
|
109
|
-
```
|
1
|
+

|
2
|
+
[](https://github.com/stacynoland/python-taxes/actions/workflows/tests.yml)
|
3
|
+

|
4
|
+

|
5
|
+
[](https://pypi.org/project/python-taxes/)
|
6
|
+

|
7
|
+
[](https://github.com/psf/black)
|
8
|
+
|
9
|
+
> Disclaimer: This library is not intended to be used for tax advice. Please consult a tax professional for any tax-related questions or concerns.
|
10
|
+
|
11
|
+
Python-Taxes is a library designed to make calculating US Federal taxes easy.
|
12
|
+
|
13
|
+
The library supports Social Security, Medicare, and Federal Income taxes for tax years 2023 to 2025. Please note, 2025 is only added for future tax season.
|
14
|
+
|
15
|
+
`CURRENT_TAX_YEAR` is set to 2024.
|
16
|
+
|
17
|
+
## Installation
|
18
|
+
|
19
|
+
To install the library, you can use pip or another dependency manager like Poetry.
|
20
|
+
|
21
|
+
`pip install python-taxes`
|
22
|
+
|
23
|
+
or
|
24
|
+
|
25
|
+
`poetry add python-taxes`
|
26
|
+
|
27
|
+
## Usage
|
28
|
+
|
29
|
+
### Social Security Tax
|
30
|
+
|
31
|
+
To calculate Social Security tax, use the `social_security` module:
|
32
|
+
|
33
|
+
```python
|
34
|
+
from python_taxes.federal import social_security
|
35
|
+
|
36
|
+
social_security.withholding(5000) # Returns the amount withheld for Social Security tax
|
37
|
+
|
38
|
+
social_security.withholding(
|
39
|
+
taxable_wages=3000,
|
40
|
+
taxable_wages_ytd=100000,
|
41
|
+
self_employed=False,
|
42
|
+
tax_year=2024,
|
43
|
+
rounded=True,
|
44
|
+
)
|
45
|
+
```
|
46
|
+
---
|
47
|
+
### Medicare Tax
|
48
|
+
|
49
|
+
To calculate Medicare tax, use the `medicare` module. There are two functions available:
|
50
|
+
|
51
|
+
`medicare.required_withholding` - Returns the required amount to withhold for Medicare tax regardless of filing status.
|
52
|
+
`medicare.additional_withholding` - Returns the amount that should be withheld based on filing status, including Additional Medicare tax.
|
53
|
+
|
54
|
+
```python
|
55
|
+
from python_taxes.federal import medicare
|
56
|
+
|
57
|
+
medicare.required_withholding(5000) # Returns the amount withheld for Medicare tax
|
58
|
+
|
59
|
+
medicare.required_withholding(
|
60
|
+
taxable_wages=5000,
|
61
|
+
taxable_wages_ytd=100000,
|
62
|
+
self_employed=True,
|
63
|
+
rounded=True,
|
64
|
+
)
|
65
|
+
|
66
|
+
medicare.additional_withholding(100000, "married") # Returns the amount withheld for Medicare Tax and Additional Medicare tax, if applicable, based on filing status.
|
67
|
+
|
68
|
+
medicare.additional_withholding(
|
69
|
+
taxable_wages_ytd=100000,
|
70
|
+
filing_status="married",
|
71
|
+
self_employed=False,
|
72
|
+
rounded=True,
|
73
|
+
)
|
74
|
+
```
|
75
|
+
---
|
76
|
+
### Federal Income Tax
|
77
|
+
|
78
|
+
To calculate Federal Income tax, use the `income` package. Currently, the only payroll withholding supported is for automated systems. Specifically, the percentage tables in IRS Publication 15-T section 1 (Percentage Method Tables for Automated Payroll Systems).
|
79
|
+
|
80
|
+
```python
|
81
|
+
from python_taxes.federal import income
|
82
|
+
|
83
|
+
income.employer_withholding(10000) # Returns the amount withheld for Federal Income tax
|
84
|
+
|
85
|
+
income.employer_withholding(
|
86
|
+
taxable_wages=10000,
|
87
|
+
pay_frequency="monthly",
|
88
|
+
filing_status="married",
|
89
|
+
multiple_jobs=False,
|
90
|
+
tax_credits=0,
|
91
|
+
other_income=0,
|
92
|
+
deductions=0,
|
93
|
+
extra_withholding=0,
|
94
|
+
tax_year=2024,
|
95
|
+
rounded=True,
|
96
|
+
)
|
97
|
+
|
98
|
+
income.employer_withholding_pre_2020(10000) # Returns the amount withheld for Federal Income tax - using this method is required if Form W-4 is from 2019 or earlier.
|
99
|
+
|
100
|
+
income.employer_withholding_pre_2020(
|
101
|
+
taxable_wages=10000,
|
102
|
+
pay_frequency="monthly",
|
103
|
+
marital_status="married",
|
104
|
+
allowances_claimed=0,
|
105
|
+
extra_withholding=0,
|
106
|
+
tax_year=2024,
|
107
|
+
rounded=False,
|
108
|
+
)
|
109
|
+
```
|
@@ -1,102 +1,130 @@
|
|
1
|
-
[project]
|
2
|
-
name = "python-taxes"
|
3
|
-
version = "0.
|
4
|
-
description = "A Python library for calculating US Social Security, Medicare, and Federal Income taxes."
|
5
|
-
authors = [
|
6
|
-
{name = "Stacy Noland", email = "
|
7
|
-
]
|
8
|
-
readme = "README.md"
|
9
|
-
license = { file = "LICENSE" }
|
10
|
-
requires-python = ">=3.10"
|
11
|
-
dependencies = [
|
12
|
-
"pydantic (>=2.11.3,<3.0.0)"
|
13
|
-
]
|
14
|
-
classifiers = [
|
15
|
-
"Development Status :: 4 - Beta",
|
16
|
-
"Intended Audience :: Developers",
|
17
|
-
"Intended Audience :: Information Technology",
|
18
|
-
"License :: OSI Approved :: MIT License",
|
19
|
-
"Operating System :: OS Independent",
|
20
|
-
"Programming Language :: Python",
|
21
|
-
"Programming Language :: Python :: 3",
|
22
|
-
"Programming Language :: Python :: 3 :: Only",
|
23
|
-
"Programming Language :: Python :: 3.10",
|
24
|
-
"Programming Language :: Python :: 3.11",
|
25
|
-
"Programming Language :: Python :: 3.12",
|
26
|
-
"Programming Language :: Python :: 3.13",
|
27
|
-
"
|
28
|
-
"Topic :: Software Development :: Libraries",
|
29
|
-
"
|
30
|
-
]
|
31
|
-
|
32
|
-
[project.
|
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
|
-
|
1
|
+
[project]
|
2
|
+
name = "python-taxes"
|
3
|
+
version = "0.6.0-alpha.3"
|
4
|
+
description = "A Python library for calculating US Social Security, Medicare, and Federal Income taxes."
|
5
|
+
authors = [
|
6
|
+
{name = "Stacy Noland", email = "stacy.noland@outlook.com"}
|
7
|
+
]
|
8
|
+
readme = "README.md"
|
9
|
+
license = { file = "LICENSE" }
|
10
|
+
requires-python = ">=3.10"
|
11
|
+
dependencies = [
|
12
|
+
"pydantic (>=2.11.3,<3.0.0)"
|
13
|
+
]
|
14
|
+
classifiers = [
|
15
|
+
"Development Status :: 4 - Beta",
|
16
|
+
"Intended Audience :: Developers",
|
17
|
+
"Intended Audience :: Information Technology",
|
18
|
+
"License :: OSI Approved :: MIT License",
|
19
|
+
"Operating System :: OS Independent",
|
20
|
+
"Programming Language :: Python",
|
21
|
+
"Programming Language :: Python :: 3",
|
22
|
+
"Programming Language :: Python :: 3 :: Only",
|
23
|
+
"Programming Language :: Python :: 3.10",
|
24
|
+
"Programming Language :: Python :: 3.11",
|
25
|
+
"Programming Language :: Python :: 3.12",
|
26
|
+
"Programming Language :: Python :: 3.13",
|
27
|
+
"Topic :: Software Development :: Libraries",
|
28
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
29
|
+
"Typing :: Typed",
|
30
|
+
]
|
31
|
+
|
32
|
+
[project.optional-dependencies]
|
33
|
+
cli = ["typer (>=0.15.0,<1.0.0)"]
|
34
|
+
|
35
|
+
[project.scripts]
|
36
|
+
pytax = "python_taxes.cli:app"
|
37
|
+
|
38
|
+
[project.urls]
|
39
|
+
Homepage = "https://github.com/stacynoland/python-taxes"
|
40
|
+
Source = "https://github.com/stacynoland/python-taxes"
|
41
|
+
|
42
|
+
[tool.poetry]
|
43
|
+
packages = [{include = "python_taxes", from = "src"}]
|
44
|
+
|
45
|
+
[tool.poetry.group.cli]
|
46
|
+
optional = true
|
47
|
+
|
48
|
+
[tool.poetry.group.cli.dependencies]
|
49
|
+
typer = "^0.15.3"
|
50
|
+
|
51
|
+
[tool.poetry.group.dev]
|
52
|
+
optional = true
|
53
|
+
|
54
|
+
[tool.poetry.group.dev.dependencies]
|
55
|
+
pytest = "^8.3.5"
|
56
|
+
pytest-cov = "^6.1.1"
|
57
|
+
black = "^25.1.0"
|
58
|
+
flake8 = "^7.2.0"
|
59
|
+
isort = "^6.0.1"
|
60
|
+
mypy = "^1.15.0"
|
61
|
+
tox = "^4.25.0"
|
62
|
+
pre-commit = "^4.2.0"
|
63
|
+
|
64
|
+
[tool.tox]
|
65
|
+
requires = ["tox>=4.25.0,<5.0.0"]
|
66
|
+
env_list = ["lint", "testcov"]
|
67
|
+
labels = { tests = ["3.10", "3.11", "3.12", "3.13"] }
|
68
|
+
|
69
|
+
[dependency-groups]
|
70
|
+
tests = [
|
71
|
+
"pytest>=8.3.0,<9.0.0",
|
72
|
+
"typer>=0.15.0,<1.0.0",
|
73
|
+
]
|
74
|
+
static = [
|
75
|
+
"black>=25.1.0,<26.0.0",
|
76
|
+
"isort>=6.0.0,<7.0.0",
|
77
|
+
"flake8>=7.2.0,<8.0.0",
|
78
|
+
"mypy>=1.15.0,<2.0.0",
|
79
|
+
]
|
80
|
+
|
81
|
+
[tool.tox.env_run_base]
|
82
|
+
description = "Run tests under {base_python}"
|
83
|
+
package = "wheel"
|
84
|
+
dependency_groups = ["tests"]
|
85
|
+
commands = [
|
86
|
+
["pytest", { replace = "posargs", default = ["tests"], extend = true }],
|
87
|
+
]
|
88
|
+
|
89
|
+
[tool.tox.env.testcov]
|
90
|
+
description = "Run tests and coverage report"
|
91
|
+
package = "wheel"
|
92
|
+
dependency_groups = ["tests"]
|
93
|
+
deps = [
|
94
|
+
"pytest-cov>=6.1.0,<7.0.0",
|
95
|
+
]
|
96
|
+
commands = [
|
97
|
+
["pytest", { replace = "posargs", default = ["--cov", "--cov-report", "term-missing"], extend = true }],
|
98
|
+
]
|
99
|
+
|
100
|
+
[tool.tox.env.lint]
|
101
|
+
description = "Lint code base"
|
102
|
+
package = "wheel"
|
103
|
+
dependency_groups = ["static", "tests"]
|
104
|
+
commands = [
|
105
|
+
["black", { replace = "posargs", default = ["."], extend = true }],
|
106
|
+
["isort", { replace = "posargs", default = ["src", "tests"], extend = true }],
|
107
|
+
["flake8", { replace = "posargs", default = ["src", "tests"], extend = true }],
|
108
|
+
["mypy", { replace = "posargs", default = ["src", "tests"], extend = true }],
|
109
|
+
]
|
110
|
+
|
111
|
+
[tool.tox.env.check]
|
112
|
+
description = "Check code base"
|
113
|
+
package = "wheel"
|
114
|
+
dependency_groups = ["static", "tests"]
|
115
|
+
commands = [
|
116
|
+
["black", { replace = "posargs", default = ["--check", "."], extend = true }],
|
117
|
+
["isort", { replace = "posargs", default = ["--check-only", "src", "tests"], extend = true }],
|
118
|
+
["flake8", { replace = "posargs", default = ["src", "tests"], extend = true }],
|
119
|
+
["mypy", { replace = "posargs", default = ["src", "tests"], extend = true }],
|
120
|
+
]
|
121
|
+
|
122
|
+
[tool.isort]
|
123
|
+
profile = "black"
|
124
|
+
skip_gitignore = true
|
125
|
+
extend_skip = [".pytest_cache",]
|
126
|
+
skip_glob = ["*/__pycache__/*", "tests/__pycache__/*"]
|
127
|
+
|
128
|
+
[build-system]
|
129
|
+
requires = ["poetry-core>=2.0.0,<3.0.0"]
|
130
|
+
build-backend = "poetry.core.masonry.api"
|
@@ -1,7 +1,7 @@
|
|
1
|
-
from decimal import Decimal
|
2
|
-
|
3
|
-
from pydantic import Field
|
4
|
-
|
5
|
-
CURRENT_TAX_YEAR = 2024
|
6
|
-
|
7
|
-
currency_field = Field(ge=Decimal("0.
|
1
|
+
from decimal import Decimal
|
2
|
+
|
3
|
+
from pydantic import Field
|
4
|
+
|
5
|
+
CURRENT_TAX_YEAR = 2024
|
6
|
+
|
7
|
+
currency_field = Field(ge=Decimal("0.00"), decimal_places=2)
|