Skip to content

#261- Replace manual type checking with PEP 484 type hints#262

Open
Cubix33 wants to merge 1 commit intofireform-core:mainfrom
Cubix33:pep-type-hinting
Open

#261- Replace manual type checking with PEP 484 type hints#262
Cubix33 wants to merge 1 commit intofireform-core:mainfrom
Cubix33:pep-type-hinting

Conversation

@Cubix33
Copy link

@Cubix33 Cubix33 commented Mar 16, 2026

Closes #261

📝 Description

Removes the outdated and clunky type_check_all() method in favor of modern Python type hinting. This cleans up the codebase, removes boilerplate validation logic, and allows linters and IDEs to catch type errors automatically.

🛠️ Changes Made

  • Deleted the manual type_check_all() method in src/llm.py.
  • Added PEP 484 type annotations (e.g., : str, -> dict) to __init__, build_prompt, main_loop, add_response_to_json, handle_plural_values, and get_data.
  • Cleaned up remaining inline comments and docstrings for a leaner, more readable file.

🧪 How to Test

  1. Run the application (e.g., make exec or docker compose exec app python3 src/main.py).
  2. Verify the LLM extraction and PDF filling complete successfully without throwing any type errors.

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.

[REFACTOR]: Deprecate type_check_all for modern Type Hinting

1 participant