Skip to content

Chore/fix rule resolve todos forms#965

Draft
bunvin wants to merge 2 commits into
feldroy:mainfrom
bunvin:chore/fix-rule-resolve-todos-forms
Draft

Chore/fix rule resolve todos forms#965
bunvin wants to merge 2 commits into
feldroy:mainfrom
bunvin:chore/fix-rule-resolve-todos-forms

Conversation

@bunvin
Copy link
Copy Markdown

@bunvin bunvin commented Jan 6, 2026

Issue(s)

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • New feature
    • Core Air (Air Tags, Request/Response cycle, etc)
    • Optional (Authentication, CSRF, etc)
    • Third-Party Integrated (Cookbook documentation on using Air databases or a task manager, etc)
    • Out-of-Scope (Formal integration with databases, external task managers, or commercial services etc - won't be accepted, please create a separate project)
  • Refactoring (no functional changes, no api changes)
  • Chore: Dependency updates, Python version changes, etc.
  • Build related changes
  • Documentation content changes
  • [v] Other (please describe):

Pull request tasks

The following have been completed for this task:

  • [v] Code changes
  • Documentation changes for new or changed features
  • Alterations of behavior come with a working implementation in the examples folder
  • Tests on new or altered behaviors

Checklist

  • [v] I have run just test and just qa, ensuring my code changes passes all existing tests
  • I have performed a self-review of my own code
  • [v] I have ensured that there are tests to cover my changes

Demo or screenshot

Original Issue #645

Other information

This Issue is actually 2 TODO notes in code.
this is the 1/2.

what todo: forms.py attribute data is type Any
should be changed into more specific type.

solution: based on test_forms.py type should be pydantic BaseModel

PROBLEM: after type change all example failed
also after seeing some projects using the class AirForm it seems they would fail is we change the type from Any

Added test to verify non-BaseModel types are rejected.
Resolves TODO in forms.py line 66.
Related to feldroy#645
…renamed new test_forms function to test_airform_rejects_non_basemodel_data
Copy link
Copy Markdown
Member

@pydanny pydanny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just switch back the dependency to plain fastapi and run uv lock again. 😄

Comment thread pyproject.toml
"Jinja2>=3.1.6",
"fastapi>=0.125.0",
"frozendict>=2.4.7",
"fastapi[standard]>=0.125.0",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is not necessary for this PR. Can you remove it?

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.

3 participants