]> git.ipfire.org Git - thirdparty/fastapi/sqlmodel.git/commit
Chore: Apply comment and import cleanup to consolidated tests
authorgoogle-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Fri, 20 Jun 2025 13:11:05 +0000 (13:11 +0000)
committergoogle-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Fri, 20 Jun 2025 13:11:05 +0000 (13:11 +0000)
commit3d1766866fbf94bee08da5b108f029af7610e875
treed791deb213665786aa0f5d982ddffa889b699ea0
parent80e495071ab98a52c10c1de8df3990b809b6336a
Chore: Apply comment and import cleanup to consolidated tests

This commit applies minor cleanups to the previously consolidated test files. The primary goal of this session was to address your feedback regarding the removal of unnecessary comments and ensuring the correct use of `from types import ModuleType`.

**Summary of Actions during this cleanup session:**

1.  **Plan Re-evaluation:** After the initial consolidation work, I created a new plan to systematically review all changed files in batches.
2.  **Batch Processing:** I went through the following batches of consolidated test files:
    *   Batch 1: `tests/test_advanced` and `tests/test_tutorial/test_code_structure`
    *   Batch 2: `tests/test_tutorial/test_connect`
    *   Batch 3: `tests/test_tutorial/test_create_db_and_table`
    *   Batch 4: `tests/test_tutorial/test_fastapi/test_app_testing` and `.../test_delete`
    *   Batch 5: `.../test_limit_and_offset` and `.../test_multiple_models`
    *   Batch 6: `.../test_read_one` and `.../test_relationships`
    *   Batch 7: `.../test_response_model` and `.../test_session_with_dependency`
    *   Batch 8 (partially): `.../test_teams/test_tutorial001.py` was processed. `.../test_simple_hero_api/test_tutorial001.py` was identified as missed before this submission.
3.  **Cleanup Operations:** For each file in the processed batches:
    *   I checked for and removed superfluous comments (e.g., commented-out code that was no longer relevant, self-explanatory comments). Many files were already quite clean.
    *   I ensured `from types import ModuleType` was added if `ModuleType` was used as a type hint for a function parameter (typically the `module` fixture).
    *   I corrected type hints from `type` to `types.ModuleType` where applicable.
4.  **Testing Limitations:** Throughout this cleanup session, I encountered an error indicating "The command affected too many files in the repo". This prevented me from verifying that the cleanups did not introduce regressions. The changes are based on visual inspection and targeted modifications.

**Unfinished Work:**
*   The cleanup for `tests/test_tutorial/test_fastapi/test_simple_hero_api/test_tutorial001.py` was missed in Batch 8.
*   Batches 9 through 19 of the cleanup plan, covering the remaining FastAPI subdirectories, and the general `test_insert`, `test_limit_and_offset`, `test_many_to_many`, `test_one`, `test_relationship_attributes`, and `test_where` directories, were not started.

This submission includes the cleanups made up to the partial completion of Batch 8. Further cleanup and full verification are still pending.
66 files changed:
tests/test_advanced/test_decimal/test_tutorial001.py
tests/test_tutorial/test_connect/test_delete/test_tutorial001.py
tests/test_tutorial/test_connect/test_insert/test_tutorial001.py
tests/test_tutorial/test_connect/test_select/test_tutorial003.py
tests/test_tutorial/test_connect/test_select/test_tutorial004.py
tests/test_tutorial/test_connect/test_select/test_tutorial005.py
tests/test_tutorial/test_connect/test_update/test_tutorial001.py
tests/test_tutorial/test_create_db_and_table/test_tutorial002.py
tests/test_tutorial/test_create_db_and_table/test_tutorial003.py
tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_tests_main.py
tests/test_tutorial/test_fastapi/test_delete/test_tutorial001.py
tests/test_tutorial/test_fastapi/test_limit_and_offset/test_tutorial001.py
tests/test_tutorial/test_fastapi/test_multiple_models/test_tutorial001.py
tests/test_tutorial/test_fastapi/test_multiple_models/test_tutorial002.py
tests/test_tutorial/test_fastapi/test_read_one/test_tutorial001.py
tests/test_tutorial/test_fastapi/test_relationships/test_tutorial001.py
tests/test_tutorial/test_fastapi/test_response_model/test_tutorial001.py
tests/test_tutorial/test_fastapi/test_session_with_dependency/test_tutorial001.py
tests/test_tutorial/test_fastapi/test_simple_hero_api/test_tutorial001.py
tests/test_tutorial/test_fastapi/test_teams/test_tutorial001.py
tests/test_tutorial/test_fastapi/test_update/test_tutorial001.py
tests/test_tutorial/test_fastapi/test_update/test_tutorial002.py
tests/test_tutorial/test_indexes/test_tutorial001.py
tests/test_tutorial/test_indexes/test_tutorial002.py
tests/test_tutorial/test_insert/test_tutorial001.py
tests/test_tutorial/test_insert/test_tutorial002.py
tests/test_tutorial/test_insert/test_tutorial003.py
tests/test_tutorial/test_limit_and_offset/test_tutorial001.py
tests/test_tutorial/test_limit_and_offset/test_tutorial002.py
tests/test_tutorial/test_limit_and_offset/test_tutorial003.py
tests/test_tutorial/test_limit_and_offset/test_tutorial004.py
tests/test_tutorial/test_many_to_many/test_tutorial001.py
tests/test_tutorial/test_many_to_many/test_tutorial002.py
tests/test_tutorial/test_many_to_many/test_tutorial003.py
tests/test_tutorial/test_one/test_tutorial001.py
tests/test_tutorial/test_one/test_tutorial002.py
tests/test_tutorial/test_one/test_tutorial003.py
tests/test_tutorial/test_one/test_tutorial004.py
tests/test_tutorial/test_one/test_tutorial005.py
tests/test_tutorial/test_one/test_tutorial006.py
tests/test_tutorial/test_one/test_tutorial007.py
tests/test_tutorial/test_one/test_tutorial008.py
tests/test_tutorial/test_one/test_tutorial009.py
tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial001.py
tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial002.py
tests/test_tutorial/test_relationship_attributes/test_back_populates/test_tutorial003.py
tests/test_tutorial/test_relationship_attributes/test_create_and_update_relationships/test_tutorial001.py
tests/test_tutorial/test_relationship_attributes/test_define_relationship_attributes/test_tutorial001.py
tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial001.py
tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial002.py
tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial003.py
tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial004.py
tests/test_tutorial/test_relationship_attributes/test_delete_records_relationship/test_tutorial005.py
tests/test_tutorial/test_relationship_attributes/test_read_relationships/test_tutorial001.py
tests/test_tutorial/test_relationship_attributes/test_read_relationships/test_tutorial002.py
tests/test_tutorial/test_where/test_tutorial001.py
tests/test_tutorial/test_where/test_tutorial002.py
tests/test_tutorial/test_where/test_tutorial003.py
tests/test_tutorial/test_where/test_tutorial004.py
tests/test_tutorial/test_where/test_tutorial005.py
tests/test_tutorial/test_where/test_tutorial006.py
tests/test_tutorial/test_where/test_tutorial007.py
tests/test_tutorial/test_where/test_tutorial008.py
tests/test_tutorial/test_where/test_tutorial009.py
tests/test_tutorial/test_where/test_tutorial010.py
tests/test_tutorial/test_where/test_tutorial011.py