python-taxes 0.6.0a3__tar.gz → 0.7.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.6.0a3 → python_taxes-0.7.0}/LICENSE +1 -1
  2. {python_taxes-0.6.0a3 → python_taxes-0.7.0}/PKG-INFO +4 -3
  3. {python_taxes-0.6.0a3 → python_taxes-0.7.0}/pyproject.toml +4 -3
  4. {python_taxes-0.6.0a3 → python_taxes-0.7.0}/src/python_taxes/__init__.py +1 -1
  5. {python_taxes-0.6.0a3 → python_taxes-0.7.0}/src/python_taxes/cli.py +14 -3
  6. {python_taxes-0.6.0a3 → python_taxes-0.7.0}/README.md +0 -0
  7. {python_taxes-0.6.0a3 → python_taxes-0.7.0}/src/python_taxes/__main__.py +0 -0
  8. {python_taxes-0.6.0a3 → python_taxes-0.7.0}/src/python_taxes/federal/__init__.py +0 -0
  9. {python_taxes-0.6.0a3 → python_taxes-0.7.0}/src/python_taxes/federal/income/__init__.py +0 -0
  10. {python_taxes-0.6.0a3 → python_taxes-0.7.0}/src/python_taxes/federal/income/payroll/__init__.py +0 -0
  11. {python_taxes-0.6.0a3 → python_taxes-0.7.0}/src/python_taxes/federal/income/payroll/automated.py +0 -0
  12. {python_taxes-0.6.0a3 → python_taxes-0.7.0}/src/python_taxes/federal/income/tables/percentage/__init__.py +0 -0
  13. {python_taxes-0.6.0a3 → python_taxes-0.7.0}/src/python_taxes/federal/income/tables/percentage/automated/__init__.py +0 -0
  14. {python_taxes-0.6.0a3 → python_taxes-0.7.0}/src/python_taxes/federal/income/tables/percentage/automated/hoh.py +0 -0
  15. {python_taxes-0.6.0a3 → python_taxes-0.7.0}/src/python_taxes/federal/income/tables/percentage/automated/married.py +0 -0
  16. {python_taxes-0.6.0a3 → python_taxes-0.7.0}/src/python_taxes/federal/income/tables/percentage/automated/single.py +0 -0
  17. {python_taxes-0.6.0a3 → python_taxes-0.7.0}/src/python_taxes/federal/medicare.py +0 -0
  18. {python_taxes-0.6.0a3 → python_taxes-0.7.0}/src/python_taxes/federal/social_security.py +0 -0
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
21
+ SOFTWARE.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: python-taxes
3
- Version: 0.6.0a3
3
+ Version: 0.7.0
4
4
  Summary: A Python library for calculating US Social Security, Medicare, and Federal Income taxes.
5
5
  License: MIT License
6
6
 
@@ -23,8 +23,9 @@ License: MIT License
23
23
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
24
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
25
  SOFTWARE.
26
+ License-File: LICENSE
26
27
  Author: Stacy Noland
27
- Author-email: stacy.noland@outlook.com
28
+ Author-email: 46572585+stacynoland@users.noreply.github.com
28
29
  Requires-Python: >=3.10
29
30
  Classifier: Development Status :: 4 - Beta
30
31
  Classifier: Intended Audience :: Developers
@@ -1,9 +1,9 @@
1
1
  [project]
2
2
  name = "python-taxes"
3
- version = "0.6.0-alpha.3"
3
+ version = "0.7.0"
4
4
  description = "A Python library for calculating US Social Security, Medicare, and Federal Income taxes."
5
5
  authors = [
6
- {name = "Stacy Noland", email = "stacy.noland@outlook.com"}
6
+ {name = "Stacy Noland", email = "46572585+stacynoland@users.noreply.github.com"}
7
7
  ]
8
8
  readme = "README.md"
9
9
  license = { file = "LICENSE" }
@@ -46,7 +46,7 @@ packages = [{include = "python_taxes", from = "src"}]
46
46
  optional = true
47
47
 
48
48
  [tool.poetry.group.cli.dependencies]
49
- typer = "^0.15.3"
49
+ typer = "^0"
50
50
 
51
51
  [tool.poetry.group.dev]
52
52
  optional = true
@@ -80,6 +80,7 @@ static = [
80
80
 
81
81
  [tool.tox.env_run_base]
82
82
  description = "Run tests under {base_python}"
83
+ set_env = { PYTHONPATH = "src" }
83
84
  package = "wheel"
84
85
  dependency_groups = ["tests"]
85
86
  commands = [
@@ -2,6 +2,6 @@ from decimal import Decimal
2
2
 
3
3
  from pydantic import Field
4
4
 
5
- CURRENT_TAX_YEAR = 2024
5
+ CURRENT_TAX_YEAR = 2025
6
6
 
7
7
  currency_field = Field(ge=Decimal("0.00"), decimal_places=2)
@@ -1,9 +1,9 @@
1
1
  import sys
2
- from decimal import Decimal
2
+ from decimal import Decimal, InvalidOperation
3
3
  from enum import Enum
4
4
  from typing import Annotated
5
5
 
6
- from pydantic import StrictBool, validate_call
6
+ from pydantic import StrictBool, ValidationError, validate_call
7
7
 
8
8
  from python_taxes import CURRENT_TAX_YEAR, currency_field
9
9
  from python_taxes.federal.income import employer_withholding as income_withholding
@@ -37,10 +37,21 @@ class FilingStatus(str, Enum):
37
37
 
38
38
 
39
39
  @validate_call
40
- def currency(value: Annotated[Decimal, currency_field]) -> Decimal:
40
+ def _currency(value: Annotated[Decimal, currency_field]) -> Decimal:
41
41
  return value
42
42
 
43
43
 
44
+ def currency(value) -> Decimal:
45
+ try:
46
+ ret_val = _currency(value)
47
+ return ret_val
48
+ except (InvalidOperation, ValidationError):
49
+ raise typer.BadParameter(
50
+ f"Invalid currency value: {value}. "
51
+ "Please enter a number with max 2 decimal places."
52
+ )
53
+
54
+
44
55
  @app.callback()
45
56
  def callback():
46
57
  """
File without changes