Skip to content

refactor: Pre-commit and Type Checking Improvements#7

Merged
iamserda merged 1 commit into
mainfrom
dev0
Feb 12, 2026
Merged

refactor: Pre-commit and Type Checking Improvements#7
iamserda merged 1 commit into
mainfrom
dev0

Conversation

@iamserda
Copy link
Copy Markdown
Owner

Add SQLModel dependency and refactor URL models

  • Added sqlmodel dependency to pyproject.toml.
  • Refactored URL request and response models by moving them to a new schemas.py file.
  • Updated import statements in main.py to reflect the new model locations. --@iamserda
    This pull request updates the pre-commit and type checking configuration, adds a new dependency, and refactors model imports and file structure for better organization. The most significant changes are grouped below:

Pre-commit and Type Checking Improvements:

  • Updated the mypy pre-commit hook in .pre-commit-config.yaml to use poetry run mypy with system language and project root as the target, improving consistency with the project's dependency management.
  • Changed the Makefile so that the typecheck target runs mypy via pre-commit, and improved the precommit target to echo a success message instead of running pre-commit redundantly.
  • Removed the ruff target from the Makefile to streamline linting commands.

Dependency Management:

  • Added sqlmodel as a new dependency in pyproject.toml, preparing the project for SQL modeling.

Model Refactoring and File Structure:

  • Renamed src/models/main.py to src/models/schemas.py, removed unused models (ShortiLink, ClickEvent), and updated imports in src/app/main.py to reflect this change, clarifying the distinction between schema and other model types. [1] [2]

Add SQLModel dependency and refactor URL models
- Added `sqlmodel` dependency to `pyproject.toml`.
- Refactored URL request and response models by moving them to a new `schemas.py` file.
- Updated import statements in `main.py` to reflect the new model locations. --@iamserda
@iamserda iamserda merged commit 3927ab1 into main Feb 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant