Skip to content

test: migrate clean notion task tests to SQLAlchemy 2.0 APIs#35159

Merged
asukaminato0721 merged 5 commits intolanggenius:mainfrom
jimcody1995:test/sqlalchemy2-clean-notion-document-task
Apr 16, 2026
Merged

test: migrate clean notion task tests to SQLAlchemy 2.0 APIs#35159
asukaminato0721 merged 5 commits intolanggenius:mainfrom
jimcody1995:test/sqlalchemy2-clean-notion-document-task

Conversation

@jimcody1995
Copy link
Copy Markdown
Contributor

Summary

  • Migrate clean notion document task integration tests to SQLAlchemy 2.0 statement APIs
  • Replace legacy query/count assertions with select(func.count())-based checks
  • Keep test behavior unchanged while aligning with ongoing cleanup for [Refactor/Chore] clean old api #35141

Test plan

  • Lint diagnostics check on modified file reports no issues

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Apr 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-14 08:10:57.078923924 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-14 08:10:46.754972659 +0000
@@ -1691,65 +1691,65 @@
 ERROR Argument `str | None` is not assignable to parameter `doc_form` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
    --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:974:22
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-  --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:90:23
+  --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:99:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:107:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:116:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:130:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:139:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:222:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:221:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:271:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:270:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:283:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:282:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:304:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:303:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:359:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:353:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:371:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:365:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:393:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:387:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:445:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:436:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:462:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:453:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:484:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:475:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:560:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:538:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:572:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:550:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:597:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:575:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:656:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:628:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:668:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:640:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:688:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:660:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:738:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:710:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:756:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:728:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:779:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:751:31
 ERROR `num_segments_per_doc` may be uninitialized [unbound-name]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:803:32
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:772:32
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:850:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:816:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:965:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:921:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:991:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:947:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1013:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:969:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1076:23
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1027:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1089:23
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1040:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1126:27
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1077:27
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/tasks/test_create_segment_to_index_task.py:75:20
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-14 08:25:22.258292813 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-14 08:25:11.700190807 +0000
@@ -1691,65 +1691,65 @@
 ERROR Argument `str | None` is not assignable to parameter `doc_form` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
     --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:1015:22
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-  --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:90:23
+  --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:99:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:107:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:116:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:130:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:139:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:222:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:221:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:271:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:270:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:283:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:282:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:304:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:303:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:359:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:353:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:371:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:365:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:393:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:387:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:445:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:436:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:462:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:453:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:484:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:475:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:560:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:538:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:572:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:550:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:597:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:575:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:656:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:628:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:668:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:640:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:688:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:660:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:738:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:710:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:756:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:728:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:779:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:751:31
 ERROR `num_segments_per_doc` may be uninitialized [unbound-name]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:803:32
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:772:32
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:850:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:816:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:965:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:921:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:991:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:947:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1013:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:969:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1076:23
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1027:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1089:23
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1040:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1126:27
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1077:27
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/tasks/test_create_segment_to_index_task.py:75:20
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]

@jimcody1995
Copy link
Copy Markdown
Contributor Author

Hi, @asukaminato0721

Updated as requested in api/tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:

Added:
from sqlalchemy import ColumnElement
from sqlalchemy.orm import Session
Typed helper signatures:
_count_documents(session: Session, condition: ColumnElement[bool]) -> int
_count_segments(session: Session, condition: ColumnElement[bool]) -> int

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-14 13:43:03.752786750 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-14 13:42:54.136891435 +0000
@@ -1691,65 +1691,65 @@
 ERROR Argument `str | None` is not assignable to parameter `doc_form` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
     --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:1015:22
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-  --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:90:23
+  --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:99:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:107:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:116:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:130:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:139:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:222:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:221:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:271:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:270:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:283:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:282:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:304:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:303:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:359:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:353:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:371:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:365:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:393:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:387:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:445:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:436:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:462:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:453:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:484:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:475:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:560:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:538:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:572:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:550:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:597:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:575:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:656:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:628:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:668:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:640:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:688:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:660:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:738:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:710:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:756:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:728:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:779:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:751:31
 ERROR `num_segments_per_doc` may be uninitialized [unbound-name]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:803:32
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:772:32
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:850:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:816:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:965:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:921:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:991:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:947:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1013:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:969:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1076:23
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1027:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1089:23
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1040:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1126:27
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1077:27
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/tasks/test_create_segment_to_index_task.py:75:20
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-14 13:43:27.000883462 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-14 13:43:16.372836312 +0000
@@ -1691,11 +1691,11 @@
 ERROR Argument `str | None` is not assignable to parameter `doc_form` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
     --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:1015:22
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-  --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:90:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:100:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:107:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:117:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:130:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:140:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:222:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
@@ -1705,51 +1705,51 @@
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:304:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:359:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:354:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:371:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:366:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:393:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:388:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:445:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:437:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:462:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:454:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:484:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:476:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:560:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:539:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:572:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:551:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:597:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:576:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:656:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:629:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:668:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:641:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:688:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:661:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:738:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:711:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:756:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:729:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:779:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:752:31
 ERROR `num_segments_per_doc` may be uninitialized [unbound-name]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:803:32
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:773:32
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:850:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:817:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:965:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:922:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:991:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:948:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1013:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:970:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1076:23
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1028:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1089:23
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1041:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1126:27
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1078:27
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/tasks/test_create_segment_to_index_task.py:75:20
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]

@github-actions
Copy link
Copy Markdown
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-04-14 13:46:35.204521515 +0000
+++ /tmp/pyrefly_pr.txt	2026-04-14 13:46:25.742489997 +0000
@@ -1691,65 +1691,65 @@
 ERROR Argument `str | None` is not assignable to parameter `doc_form` with type `str` in function `celery.app.task.Task.__call__` [bad-argument-type]
     --> tests/test_containers_integration_tests/tasks/test_clean_dataset_task.py:1015:22
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-  --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:91:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:100:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:108:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:117:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:131:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:140:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:228:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:222:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:277:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:271:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:289:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:283:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:310:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:304:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:365:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:354:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:377:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:366:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:399:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:388:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:453:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:437:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:470:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:454:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:492:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:476:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:582:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:539:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:594:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:551:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:619:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:576:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:682:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:629:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:694:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:641:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:714:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:661:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:764:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:711:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:782:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:729:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:805:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:752:31
 ERROR `num_segments_per_doc` may be uninitialized [unbound-name]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:833:32
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:773:32
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:882:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:817:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1004:23
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:922:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1030:27
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:948:27
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1052:31
+   --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:970:31
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1119:23
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1028:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1132:23
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1041:23
 ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
-    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1169:27
+    --> tests/test_containers_integration_tests/tasks/test_clean_notion_document_task.py:1078:27
 ERROR Argument `Literal['active']` is not assignable to parameter `status` with type `AccountStatus | SQLCoreOperations[AccountStatus]` in function `models.account.Account.__init__` [bad-argument-type]
   --> tests/test_containers_integration_tests/tasks/test_create_segment_to_index_task.py:75:20
 ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]

@jimcody1995
Copy link
Copy Markdown
Contributor Author

Hi, @asukaminato0721.
Could you review my PR, please?
Thank for your time.

@asukaminato0721 asukaminato0721 added this pull request to the merge queue Apr 16, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Apr 16, 2026
Merged via the queue into langgenius:main with commit 7f4fe4d Apr 16, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants