python-taxes 0.5.0__tar.gz → 0.6.0__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.
Files changed (18) hide show
  1. {python_taxes-0.5.0 → python_taxes-0.6.0}/LICENSE +21 -21
  2. {python_taxes-0.5.0 → python_taxes-0.6.0}/PKG-INFO +11 -9
  3. {python_taxes-0.5.0 → python_taxes-0.6.0}/README.md +109 -109
  4. {python_taxes-0.5.0 → python_taxes-0.6.0}/pyproject.toml +130 -102
  5. {python_taxes-0.5.0 → python_taxes-0.6.0}/src/python_taxes/__init__.py +7 -7
  6. python_taxes-0.6.0/src/python_taxes/__main__.py +4 -0
  7. python_taxes-0.6.0/src/python_taxes/cli.py +147 -0
  8. {python_taxes-0.5.0 → python_taxes-0.6.0}/src/python_taxes/federal/__init__.py +19 -19
  9. {python_taxes-0.5.0 → python_taxes-0.6.0}/src/python_taxes/federal/income/__init__.py +4 -4
  10. {python_taxes-0.5.0 → python_taxes-0.6.0}/src/python_taxes/federal/income/payroll/automated.py +184 -174
  11. {python_taxes-0.5.0 → python_taxes-0.6.0}/src/python_taxes/federal/income/tables/percentage/__init__.py +15 -15
  12. {python_taxes-0.5.0 → python_taxes-0.6.0}/src/python_taxes/federal/income/tables/percentage/automated/hoh.py +309 -309
  13. {python_taxes-0.5.0 → python_taxes-0.6.0}/src/python_taxes/federal/income/tables/percentage/automated/married.py +309 -309
  14. {python_taxes-0.5.0 → python_taxes-0.6.0}/src/python_taxes/federal/income/tables/percentage/automated/single.py +309 -309
  15. {python_taxes-0.5.0 → python_taxes-0.6.0}/src/python_taxes/federal/medicare.py +91 -89
  16. {python_taxes-0.5.0 → python_taxes-0.6.0}/src/python_taxes/federal/social_security.py +55 -57
  17. {python_taxes-0.5.0 → python_taxes-0.6.0}/src/python_taxes/federal/income/payroll/__init__.py +0 -0
  18. {python_taxes-0.5.0 → python_taxes-0.6.0}/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.5.0
3
+ Version: 0.6.0
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: 46572585+stacynoland@users.noreply.github.com
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
  ![Python Taxes Image](https://github.com/user-attachments/assets/6c62946b-e749-46bb-a84e-6321397f1753)
50
- ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/python-taxes?logo=python&logoColor=yellow&label=Python)
51
- [![GitHub Release](https://img.shields.io/github/v/release/stacynoland/python-taxes?label=Current%20Release)](https://github.com/stacynoland/python-taxes/releases)
52
- ![PyPI - Status](https://img.shields.io/pypi/status/python-taxes?label=Status)
53
- [![Tests](https://github.com/stacynoland/python-taxes/actions/workflows/test.yml/badge.svg)](https://github.com/stacynoland/python-taxes/actions/workflows/test.yml)
54
- ![Coverage](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fstacynoland%2Fpython-taxes%2Frefs%2Fheads%2Fmain%2Fcoverage.json&query=%24.totals.percent_covered_display&suffix=%25&label=Coverage&color=3fb831)
55
- [![Black](https://img.shields.io/badge/Code%20Style-black-000000)](https://github.com/psf/black)
52
+ [![Tests](https://github.com/stacynoland/python-taxes/actions/workflows/tests.yml/badge.svg)](https://github.com/stacynoland/python-taxes/actions/workflows/tests.yml)
53
+ ![Coverage](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fstacynoland.com%2Fpython-taxes%2Fcoverage.json&query=%24.totals.percent_covered_display&suffix=%25&label=coverage&color=3fb831)
54
+ ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/python-taxes?logo=python&logoColor=yellow)
55
+ [![PyPI - Version](https://img.shields.io/pypi/v/python-taxes)](https://pypi.org/project/python-taxes/)
56
+ ![PyPI - Status](https://img.shields.io/pypi/status/python-taxes)
57
+ [![Black](https://img.shields.io/badge/code%20style-black-000000)](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
- ![Python Taxes Image](https://github.com/user-attachments/assets/6c62946b-e749-46bb-a84e-6321397f1753)
2
- ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/python-taxes?logo=python&logoColor=yellow&label=Python)
3
- [![GitHub Release](https://img.shields.io/github/v/release/stacynoland/python-taxes?label=Current%20Release)](https://github.com/stacynoland/python-taxes/releases)
4
- ![PyPI - Status](https://img.shields.io/pypi/status/python-taxes?label=Status)
5
- [![Tests](https://github.com/stacynoland/python-taxes/actions/workflows/test.yml/badge.svg)](https://github.com/stacynoland/python-taxes/actions/workflows/test.yml)
6
- ![Coverage](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fstacynoland%2Fpython-taxes%2Frefs%2Fheads%2Fmain%2Fcoverage.json&query=%24.totals.percent_covered_display&suffix=%25&label=Coverage&color=3fb831)
7
- [![Black](https://img.shields.io/badge/Code%20Style-black-000000)](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
+ ![Python Taxes Image](https://github.com/user-attachments/assets/6c62946b-e749-46bb-a84e-6321397f1753)
2
+ [![Tests](https://github.com/stacynoland/python-taxes/actions/workflows/tests.yml/badge.svg)](https://github.com/stacynoland/python-taxes/actions/workflows/tests.yml)
3
+ ![Coverage](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fstacynoland.com%2Fpython-taxes%2Fcoverage.json&query=%24.totals.percent_covered_display&suffix=%25&label=coverage&color=3fb831)
4
+ ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/python-taxes?logo=python&logoColor=yellow)
5
+ [![PyPI - Version](https://img.shields.io/pypi/v/python-taxes)](https://pypi.org/project/python-taxes/)
6
+ ![PyPI - Status](https://img.shields.io/pypi/status/python-taxes)
7
+ [![Black](https://img.shields.io/badge/code%20style-black-000000)](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.5.0"
4
- description = "A Python library for calculating US Social Security, Medicare, and Federal Income taxes."
5
- authors = [
6
- {name = "Stacy Noland", email = "46572585+stacynoland@users.noreply.github.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
- "Typing :: Typed",
28
- "Topic :: Software Development :: Libraries",
29
- "Topic :: Software Development :: Libraries :: Python Modules",
30
- ]
31
-
32
- [project.urls]
33
- Homepage = "https://github.com/stacynoland/python-taxes"
34
- Source = "https://github.com/stacynoland/python-taxes"
35
-
36
- [tool.poetry]
37
- packages = [{include = "python_taxes", from = "src"}]
38
-
39
- [tool.poetry.group.dev.dependencies]
40
- pytest = "^8.3.5"
41
- pytest-cov = "^6.1.1"
42
- flake8 = "^7.2.0"
43
- mypy = "^1.15.0"
44
- tox = "^4.25.0"
45
- black = "^25.1.0"
46
- isort = "^6.0.1"
47
- pre-commit = "^4.2.0"
48
-
49
- [tool.tox]
50
- requires = ["tox>=4.25.0,<5.0.0"]
51
- env_list = ["py3", "type", "lint", "format"]
52
-
53
- [dependency-groups]
54
- pytest = [
55
- "pytest>=8.3.0,<9.0.0",
56
- ]
57
-
58
- [tool.tox.env_run_base]
59
- description = "Run tests under {base_python}"
60
- package = "wheel"
61
- dependency_groups = ["pytest"]
62
- deps = [
63
- "pytest-cov>=6.1.0,<7.0.0",
64
- ]
65
- commands = [["pytest"]]
66
-
67
- [tool.tox.env.type]
68
- description = "Run type checking on code base"
69
- package = "wheel"
70
- dependency_groups = ["pytest"]
71
- deps = [
72
- "mypy>=1.15.0,<2.0.0",
73
- ]
74
- commands = [["mypy", "."]]
75
-
76
- [tool.tox.env.lint]
77
- description = "Run linters on code base"
78
- package = "wheel"
79
- deps = ["flake8>=7.2.0,<8.0.0"]
80
- commands = [["flake8", "."]]
81
-
82
- [tool.tox.env.format]
83
- description = "Run formatters on code base"
84
- package = "wheel"
85
- deps = [
86
- "black>=25.1.0,<26.0.0",
87
- "isort>=6.0.0,<7.0.0",
88
- ]
89
- commands = [
90
- ["black", "."],
91
- ["isort", "."],
92
- ]
93
-
94
- [tool.isort]
95
- profile = "black"
96
- skip_gitignore = true
97
- extend_skip = [".pytest_cache",]
98
- skip_glob = ["*/__pycache__/*", "tests/__pycache__/*"]
99
-
100
- [build-system]
101
- requires = ["poetry-core>=2.0.0,<3.0.0"]
102
- build-backend = "poetry.core.masonry.api"
1
+ [project]
2
+ name = "python-taxes"
3
+ version = "0.6.0"
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.01"), decimal_places=2)
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)
@@ -0,0 +1,4 @@
1
+ if __name__ == "__main__":
2
+ from python_taxes.cli import app
3
+
4
+ app()