Skip to content

Refactor: Change to dataclass, Move files, Refactor test codes and Fix mypy - #14

Merged
VictorTan93 merged 2 commits into
masterfrom
victor/simple-refactor
Dec 24, 2025
Merged

Refactor: Change to dataclass, Move files, Refactor test codes and Fix mypy#14
VictorTan93 merged 2 commits into
masterfrom
victor/simple-refactor

Conversation

@VictorTan93

@VictorTan93 VictorTan93 commented Dec 23, 2025

Copy link
Copy Markdown

📝 Description

Summary

This refactor-only PR improves code organization, type safety, and maintainability. The changes are entirely internal and maintain backward compatibility.

  1. Converted Money and Currency classes to use Python's @dataclass decorator
  2. Fix some mypy
  3. Move Money and Currency into its own file in dataclasses folder
  4. Move CURRENCY into its own file constants.py
  5. Move all custom exceptions into its own file exceptions.py
  6. Split monolithic test files into focused modules (e.g., test_money_operations.py, test_django_lookups.py)
  7. Change to function-based test codes

✅ Pre-review checklist for the PR author

  • I have tested my code locally on my machine
  • I have written tests (if appropriate)
  • I have added appropriate label to PR

@VictorTan93
VictorTan93 merged commit 56727df into master Dec 24, 2025
6 checks passed
@VictorTan93
VictorTan93 deleted the victor/simple-refactor branch December 24, 2025 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants