-
-
Notifications
You must be signed in to change notification settings - Fork 186
Expand file tree
/
Copy pathmypy.ini
More file actions
711 lines (532 loc) · 24.4 KB
/
Copy pathmypy.ini
File metadata and controls
711 lines (532 loc) · 24.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
# ---------------------------------------------------------------------------
# mypy configuration (issue #1331)
#
# Split out from setup.cfg because the per-module baseline list below is
# large. The baseline names every file that currently has type errors, so
# new modules added to opencontractserver.* / config.* are NOT silenced
# and WILL fail CI / the pre-commit hook if they have errors.
#
# See docs/typing/README.md for the graduation workflow.
# ---------------------------------------------------------------------------
[mypy]
# Must match ARG PYTHON_VERSION in compose/*/django/Dockerfile (3.12.*); it
# governs both the pre-commit ``mypy`` hook and the standalone ``Run mypy`` CI
# step (.github/workflows/backend.yml). A stale sub-3.12 target makes mypy
# reject PEP 695 ``type`` statements emitted by newer (unpinned) dependency
# stubs (e.g. numpy >= 2.5.0's ``__init__.pyi``), aborting the whole run with
# "errors prevented further checking".
python_version = 3.12
check_untyped_defs = True
ignore_missing_imports = True
warn_unused_ignores = True
warn_redundant_casts = True
warn_unused_configs = True
plugins = mypy_django_plugin.main, mypy_drf_plugin.main, strawberry.ext.mypy_plugin
[mypy.plugins.django-stubs]
# Dedicated settings module that supplies a dummy DATABASE_URL default so
# contributors don't need env vars to run mypy. See config/settings/mypy.py.
django_settings_module = config.settings.mypy
[mypy-*.migrations.*]
# Django migrations should not produce any errors:
ignore_errors = True
# ---------------------------------------------------------------------------
# Baseline: per-module ignore_errors for every file that had a type error
# at the time of issue #1331 (357 files, 7208 errors). Grouped by top-level
# subpackage for readability; within each group modules are listed
# alphabetically so diffs stay clean.
#
# GRADUATION: to move a module out of the baseline, delete its section,
# run mypy, fix what surfaces, and prune the corresponding lines from
# docs/typing/mypy_baseline.txt.
# ---------------------------------------------------------------------------
# --- config.graphql ---
#
# Issue #1332 graduated the bulk of ``config.graphql.*`` (originally 35 files
# at the time of #1331). Issue #1485 graduated the remaining 14 modules,
# completing the surface. ``config.graphql.*`` is now fully type-checked.
# --- config.settings + config.websocket ---
#
# Issue #1738 graduated the config tail: ``config.settings.{base,local,
# test_integration}`` and ``config.websocket.consumers.{thread_updates,
# unified_agent_conversation}``. ``config.*`` is now fully type-checked.
# --- opencontractserver.llms ---
#
# Issue #1484 graduated the remaining ``opencontractserver.llms.*`` modules
# (agents, api/client, vector_stores) out of the baseline. The previous
# baseline covered agent_factory, core_agents, pydantic_ai_agents,
# timeline_stream_mixin, api, client, and three vector_store modules — all
# now type-check clean.
# --- opencontractserver.mcp (1 file) ---
#
# Issue #1486 graduated mcp.server and mcp.tools out of the baseline. Only
# the test_mcp module remains — the worst-offender file at 319 errors —
# tracked separately for a dedicated graduation pass.
[mypy-opencontractserver.mcp.tests.test_mcp]
ignore_errors = True
# --- opencontractserver.shared ---
#
# Issue #1477 graduated Managers and decorators out of the baseline.
# The package is now type-clean.
# --- opencontractserver.tasks ---
#
# Issue #1482 graduated all 16 modules out of the baseline. The package is
# now type-clean.
# --- opencontractserver.tests (182 files) ---
#
# Issue #1738 graduated the 18-module ``tests.permissioning.*`` subpackage
# out of the baseline (162 errors cleared, 313 lines pruned from
# ``mypy_baseline.txt``). Most errors were the standard Django
# ``setUpTestData`` class-attribute pattern (recommended fix from #1479);
# real type bugs that surfaced: ``CoreAgent`` Protocol was missing its
# public ``config: AgentConfig`` attribute (5 callers in tests).
#
# Issue #1738 also graduated the 6 ``tests.test_annotation_*`` leaf modules
# (the ``annotation`` domain chunk from the issue's batching plan):
# ``test_annotation_admin``, ``test_annotation_images_api``,
# ``test_annotation_permission_mutations``, ``test_annotation_privacy``,
# ``test_annotation_tree``, ``test_annotation_utils``. The ``document``
# (#1851) and ``corpus`` (#1866) domain chunks followed.
#
# Issue #1738 also graduated the 9 ``tests.test_agent*`` leaf modules (the
# ``agent`` domain chunk): ``test_agent_action_result``,
# ``test_agent_action_result_admin``, ``test_agent_api``,
# ``test_agent_factory``, ``test_agent_framework_api``, ``test_agent_memory``,
# ``test_agent_tasks``, ``test_agentic_highlighter_task``, ``test_agents``.
#
# Issue #1738 also graduated the 6 ``extract`` domain modules (the
# structured-data-extraction feature: Extracts + their Fieldsets/Columns,
# Datacells, and metadata columns, all in ``extracts.models``):
# ``test_extract_mutations``, ``test_extract_queries``, ``test_extract_tasks``,
# ``test_datacell_mutations``, ``test_column_mutations``,
# ``test_metadata_columns_graphql`` (57 lines pruned). All but
# ``test_extract_tasks`` needed only the ``self.client`` →
# ``self.graphene_client`` rename (a ``graphene.test.Client`` assigned to
# ``self.client`` shadows ``django.test.TestCase.client``, which has no
# ``.execute()``); ``test_extract_tasks`` needed no code change — its
# historical ``set_permissions_for_obj_to_user`` arg-type errors no longer
# reproduce under ``django-stubs==6.0.5``.
#
# Issue #1738 also graduated the 14-module ``pipeline & parsers`` domain
# chunk (the document-parsing pipeline: registry/settings/utils core plus
# the Docling/LlamaParse/Markdown/Text/chunked parsers):
# ``test_base_pipeline_parser``, ``test_pipeline_component_base``,
# ``test_pipeline_component_queries``, ``test_pipeline_hardening``,
# ``test_pipeline_registry``, ``test_pipeline_settings``,
# ``test_pipeline_settings_schema``, ``test_pipeline_utils``,
# ``test_chunked_parser``, ``test_markdown_parser``,
# ``test_doc_parser_docling_rest``, ``test_doc_parser_docxodus``,
# ``test_doc_parser_llamaparse``, ``test_txt_ingestor_pipeline`` (216 lines
# pruned). Standard patterns plus ``cast(...)`` / typed literals
# (``BoundingBoxPythonType``, ``TokenIdPythonType``) for the parser helpers'
# intentionally-partial dict fixtures, and ``ClassVar`` / override-signature
# fixes on the probe embedders. Surfaced one real production gap:
# ``get_components_by_mimetype`` declared ``file_type: Optional[FileTypeEnum]``
# but its body already handles MIME strings -- widened to
# ``Optional[Union[str, FileTypeEnum]]`` (removing a now-unused
# ``# type: ignore[arg-type]`` in ``tasks/doc_tasks.py``).
#
# Issue #1738 also graduated the 7-module ``conversation & threading`` domain
# chunk (the chat/threads feature): ``test_conversation_mutations_graphql``,
# ``test_conversation_permissions``, ``test_conversation_query``,
# ``test_conversation_search``, ``test_long_conversation_api``,
# ``test_thread_corpus_actions``, ``test_threading`` (433 lines pruned). Mostly
# the ``setUpClass``/``setUpTestData`` class-attribute pattern plus the
# ``self.client`` → ``self.graphene_client`` rename and ``assert ... is not
# None`` narrowing; the three ``setUpClass``-heavy files also swapped their
# ``User = get_user_model()`` alias for the concrete
# ``from opencontractserver.users.models import User`` import (mypy rejects a
# ``get_user_model()`` variable as a type annotation). Surfaced the
# undeclared ``_skip_signals`` fixture flag — now declared once as
# ``_skip_signals: bool`` on ``InstanceUserCanMixin`` (``shared/user_can_mixin.py``,
# shared by ``BaseOCModel`` + ``Corpus``/``CorpusFolder``), removing a now-unused
# ``# type: ignore[attr-defined]`` in ``llms/tools/moderation_tools.py``.
[mypy-opencontractserver.tests.base]
ignore_errors = True
[mypy-opencontractserver.tests.diagnostic_runner]
ignore_errors = True
[mypy-opencontractserver.tests.enhanced_diagnostic_runner]
ignore_errors = True
[mypy-opencontractserver.tests.factories]
ignore_errors = True
[mypy-opencontractserver.tests.performance_optimizations.test_base]
ignore_errors = True
[mypy-opencontractserver.tests.performance_optimizations.test_pdf_hash_graphql]
ignore_errors = True
[mypy-opencontractserver.tests.test_add_annotation_idor]
ignore_errors = True
[mypy-opencontractserver.tests.test_url_annotation]
ignore_errors = True
[mypy-opencontractserver.tests.test_admin]
ignore_errors = True
[mypy-opencontractserver.tests.test_admin_auth]
ignore_errors = True
[mypy-opencontractserver.tests.test_analysis_annotation_import]
ignore_errors = True
[mypy-opencontractserver.tests.test_analyzers]
ignore_errors = True
[mypy-opencontractserver.tests.test_annotated_document_import]
ignore_errors = True
[mypy-opencontractserver.tests.test_annotation_visibility_exists]
ignore_errors = True
[mypy-opencontractserver.tests.test_async_task_decorators]
ignore_errors = True
[mypy-opencontractserver.tests.test_auth0_jwks_cache]
ignore_errors = True
[mypy-opencontractserver.tests.test_backfill_default_embeddings]
ignore_errors = True
[mypy-opencontractserver.tests.test_badges]
ignore_errors = True
[mypy-opencontractserver.tests.test_base_embedder]
ignore_errors = True
[mypy-opencontractserver.tests.test_batch_embedding]
ignore_errors = True
[mypy-opencontractserver.tests.test_bulk_document_upload]
ignore_errors = True
[mypy-opencontractserver.tests.test_caml_review_tools]
ignore_errors = True
[mypy-opencontractserver.tests.test_cloud_run_helpers]
ignore_errors = True
[mypy-opencontractserver.tests.test_compact_json]
ignore_errors = True
[mypy-opencontractserver.tests.test_compact_pawls]
ignore_errors = True
[mypy-opencontractserver.tests.test_core_agents]
ignore_errors = True
[mypy-opencontractserver.tests.test_core_tool_factory]
ignore_errors = True
[mypy-opencontractserver.tests.test_corpus_branding]
ignore_errors = True
[mypy-opencontractserver.tests.test_default_labelset]
ignore_errors = True
[mypy-opencontractserver.tests.test_django_annotation_vector_store]
ignore_errors = True
[mypy-opencontractserver.tests.test_doc_tasks]
ignore_errors = True
[mypy-opencontractserver.tests.test_dual_embeddings]
ignore_errors = True
[mypy-opencontractserver.tests.test_duplicate_tool_registration]
ignore_errors = True
[mypy-opencontractserver.tests.test_embedder_management]
ignore_errors = True
[mypy-opencontractserver.tests.test_embedding_manager]
ignore_errors = True
[mypy-opencontractserver.tests.test_engagement_metrics_graphql]
ignore_errors = True
[mypy-opencontractserver.tests.test_engagement_metrics_tasks]
ignore_errors = True
[mypy-opencontractserver.tests.test_etl_utils]
ignore_errors = True
[mypy-opencontractserver.tests.test_export_mutations]
ignore_errors = True
[mypy-opencontractserver.tests.test_export_v3]
ignore_errors = True
[mypy-opencontractserver.tests.test_feedback]
ignore_errors = True
[mypy-opencontractserver.tests.test_get_tasks_by_name]
ignore_errors = True
[mypy-opencontractserver.tests.test_graphql_analyzer_endpoints]
ignore_errors = True
[mypy-opencontractserver.tests.test_graphql_import_export_mutations]
ignore_errors = True
[mypy-opencontractserver.tests.test_hybrid_search]
ignore_errors = True
[mypy-opencontractserver.tests.test_image_tools]
ignore_errors = True
[mypy-opencontractserver.tests.test_import_utils]
ignore_errors = True
[mypy-opencontractserver.tests.test_ingest_doc_permission_check]
ignore_errors = True
[mypy-opencontractserver.tests.test_ingestion_source]
ignore_errors = True
[mypy-opencontractserver.tests.test_job_notifications]
ignore_errors = True
[mypy-opencontractserver.tests.test_jwt_utils]
ignore_errors = True
[mypy-opencontractserver.tests.test_label_mutations]
ignore_errors = True
[mypy-opencontractserver.tests.test_leaderboard]
ignore_errors = True
[mypy-opencontractserver.tests.test_llm_annotation_tools]
ignore_errors = True
[mypy-opencontractserver.tests.test_llm_tools]
ignore_errors = True
[mypy-opencontractserver.tests.test_mcp_extended]
ignore_errors = True
[mypy-opencontractserver.tests.test_mention_parser]
ignore_errors = True
[mypy-opencontractserver.tests.test_mention_permissions]
ignore_errors = True
[mypy-opencontractserver.tests.test_mentions]
ignore_errors = True
[mypy-opencontractserver.tests.test_migration_0055_rollback]
ignore_errors = True
[mypy-opencontractserver.tests.test_moderation]
ignore_errors = True
[mypy-opencontractserver.tests.test_move_document_tool]
ignore_errors = True
[mypy-opencontractserver.tests.test_multimodal_embedder_unit]
ignore_errors = True
[mypy-opencontractserver.tests.test_multimodal_embeddings_utils]
ignore_errors = True
[mypy-opencontractserver.tests.test_multimodal_integration]
ignore_errors = True
[mypy-opencontractserver.tests.test_nested_approval_gates]
ignore_errors = True
[mypy-opencontractserver.tests.test_non_pdf_export]
ignore_errors = True
[mypy-opencontractserver.tests.test_note_tree]
ignore_errors = True
[mypy-opencontractserver.tests.test_notification_graphql]
ignore_errors = True
[mypy-opencontractserver.tests.test_notification_websocket]
ignore_errors = True
[mypy-opencontractserver.tests.test_notifications]
ignore_errors = True
[mypy-opencontractserver.tests.test_og_metadata_queries]
ignore_errors = True
[mypy-opencontractserver.tests.test_openai_embedder]
ignore_errors = True
[mypy-opencontractserver.tests.test_package_annotated_docs]
ignore_errors = True
[mypy-opencontractserver.tests.test_page_imaging_tool]
ignore_errors = True
[mypy-opencontractserver.tests.test_pdf_redaction]
ignore_errors = True
[mypy-opencontractserver.tests.test_pdf_token_extraction]
ignore_errors = True
[mypy-opencontractserver.tests.test_pdf_utils]
ignore_errors = True
[mypy-opencontractserver.tests.test_permanent_deletion]
ignore_errors = True
[mypy-opencontractserver.tests.test_permission_fixes]
ignore_errors = True
[mypy-opencontractserver.tests.test_personal_corpus]
ignore_errors = True
[mypy-opencontractserver.tests.test_pydantic_ai_agents]
ignore_errors = True
[mypy-opencontractserver.tests.test_pydantic_ai_agents_integration]
ignore_errors = True
[mypy-opencontractserver.tests.test_pydantic_ai_conversation_adapters]
ignore_errors = True
[mypy-opencontractserver.tests.test_pydantic_ai_integration_testmodel]
ignore_errors = True
[mypy-opencontractserver.tests.test_pydantic_ai_tools_module]
ignore_errors = True
[mypy-opencontractserver.tests.test_query_optimizer_structural_sets]
ignore_errors = True
[mypy-opencontractserver.tests.test_query_resolvers]
ignore_errors = True
[mypy-opencontractserver.tests.test_rate_limiting]
ignore_errors = True
[mypy-opencontractserver.tests.test_relationship_mutation_permissions]
ignore_errors = True
[mypy-opencontractserver.tests.test_resolvers]
ignore_errors = True
[mypy-opencontractserver.tests.test_security_hardening]
ignore_errors = True
[mypy-opencontractserver.tests.test_security_headers_middleware]
ignore_errors = True
[mypy-opencontractserver.tests.test_semantic_search_graphql]
ignore_errors = True
[mypy-opencontractserver.tests.test_service_layer_phase5_behavioral]
ignore_errors = True
[mypy-opencontractserver.tests.test_shared_utils]
ignore_errors = True
[mypy-opencontractserver.tests.test_sidecar_import]
ignore_errors = True
[mypy-opencontractserver.tests.test_single_doc_analyzer_and_extract]
ignore_errors = True
[mypy-opencontractserver.tests.test_slug_resolvers]
ignore_errors = True
[mypy-opencontractserver.tests.test_smart_label_mutations]
ignore_errors = True
[mypy-opencontractserver.tests.test_structural_annotation_portability]
ignore_errors = True
[mypy-opencontractserver.tests.test_structural_annotation_sets]
ignore_errors = True
[mypy-opencontractserver.tests.test_structural_annotations_graphql_backwards_compat]
ignore_errors = True
[mypy-opencontractserver.tests.test_structural_protection]
ignore_errors = True
[mypy-opencontractserver.tests.test_structured_response_api]
ignore_errors = True
[mypy-opencontractserver.tests.test_structured_response_simple]
ignore_errors = True
[mypy-opencontractserver.tests.test_task_decorators]
ignore_errors = True
[mypy-opencontractserver.tests.test_telemetry]
ignore_errors = True
[mypy-opencontractserver.tests.test_text_thumbnails]
ignore_errors = True
[mypy-opencontractserver.tests.test_thumbnails]
ignore_errors = True
[mypy-opencontractserver.tests.test_tool_approval_gate]
ignore_errors = True
[mypy-opencontractserver.tests.test_types]
ignore_errors = True
[mypy-opencontractserver.tests.test_unified_rate_limiting]
ignore_errors = True
[mypy-opencontractserver.tests.test_user_profile]
ignore_errors = True
[mypy-opencontractserver.tests.test_v2_import_back_compat]
ignore_errors = True
[mypy-opencontractserver.tests.test_v3_migration]
ignore_errors = True
[mypy-opencontractserver.tests.test_version_aware_vector_store]
ignore_errors = True
[mypy-opencontractserver.tests.test_versioning_migration]
ignore_errors = True
[mypy-opencontractserver.tests.test_visibility_managers]
ignore_errors = True
[mypy-opencontractserver.tests.test_voting]
ignore_errors = True
[mypy-opencontractserver.tests.test_voting_mutations_graphql]
ignore_errors = True
[mypy-opencontractserver.tests.test_web_search_tool]
ignore_errors = True
[mypy-opencontractserver.tests.test_pdf_token_matching]
ignore_errors = True
[mypy-opencontractserver.tests.test_remap_pending_annotations]
ignore_errors = True
[mypy-opencontractserver.tests.test_worker_uploads]
ignore_errors = True
[mypy-opencontractserver.tests.test_mint_worker_token_command]
ignore_errors = True
[mypy-opencontractserver.tests.test_zip_import_integration]
ignore_errors = True
[mypy-opencontractserver.tests.websocket.test_agent_permission_escalation]
ignore_errors = True
[mypy-opencontractserver.tests.websocket.test_unified_agent_consumer]
ignore_errors = True
# --- opencontractserver.tests (strawberry migration re-baseline) ---
#
# The graphene -> strawberry migration replaced the untyped test base classes
# ``graphene_django.utils.testing.GraphQLTestCase`` and ``graphene.test.Client``
# with typed first-party equivalents (``config.graphql.testing.GraphQLTestCase``
# / ``.Client``). Those graphene classes shipped no stubs, so mypy treated them
# as ``Any``; subclassing ``Any`` made mypy skip the ENTIRE subclass body, which
# is why these 22 files read as "graduated" (type-clean) before the migration.
# Their graduation was therefore *vacuous* -- the latent errors were hidden, not
# absent.
#
# Swapping in a concretely-typed base surfaced pre-existing, non-bug patterns
# that mypy now checks:
# * the standard Django ``setUpTestData``/``setUpClass`` class-attribute
# pattern (the dominant ``attr-defined`` category -- e.g.
# ``"type[DocumentStatsTestCase]" has no attribute "alice"``);
# * ``self.client = Client(schema)`` shadowing ``django.test.TestCase.client``
# (typed ``django.test.client.Client``).
# None are real type defects and none touch test logic, so these files are
# re-baselined rather than rewritten (per the "don't touch old tests" rule).
# The newly-authored ``test_schema_parity`` is NOT baselined -- it is fixed in
# place and stays fully type-checked.
[mypy-opencontractserver.tests.test_annotation_label_permissions]
ignore_errors = True
[mypy-opencontractserver.tests.test_authority_discovery_subset]
ignore_errors = True
[mypy-opencontractserver.tests.test_authority_mapping_loader]
ignore_errors = True
[mypy-opencontractserver.tests.test_available_tools_graphql]
ignore_errors = True
[mypy-opencontractserver.tests.test_chat_message_mentioned_resources]
ignore_errors = True
[mypy-opencontractserver.tests.test_corpus_action_template_graphql]
ignore_errors = True
[mypy-opencontractserver.tests.test_corpus_cards_structural_document_resolution]
ignore_errors = True
[mypy-opencontractserver.tests.test_corpus_description]
ignore_errors = True
[mypy-opencontractserver.tests.test_corpus_description_cache]
ignore_errors = True
[mypy-opencontractserver.tests.test_corpus_list_filters]
ignore_errors = True
[mypy-opencontractserver.tests.test_corpus_voting]
ignore_errors = True
[mypy-opencontractserver.tests.test_doc_annotations_prefetch_n_plus_one]
ignore_errors = True
[mypy-opencontractserver.tests.test_document_stats]
ignore_errors = True
[mypy-opencontractserver.tests.test_document_type_read_permission]
ignore_errors = True
[mypy-opencontractserver.tests.test_document_version_count_optimizer]
ignore_errors = True
[mypy-opencontractserver.tests.test_enrichment_run_mutation]
ignore_errors = True
[mypy-opencontractserver.tests.test_file_url_prewarm]
ignore_errors = True
[mypy-opencontractserver.tests.test_fk_visibility_traversal]
ignore_errors = True
[mypy-opencontractserver.tests.test_get_document_knowledge_optimizations]
ignore_errors = True
[mypy-opencontractserver.tests.test_intelligence_setup]
ignore_errors = True
[mypy-opencontractserver.tests.test_user_display_name]
ignore_errors = True
[mypy-opencontractserver.tests.test_user_handle]
ignore_errors = True
[mypy-opencontractserver.tests.test_user_privacy]
ignore_errors = True
# --- opencontractserver.users ---
# ``opencontractserver.users.models.User`` defines reverse relations to
# ``opencontractserver.corpuses.models.Corpus``, ``.CorpusFolder``, and
# ``opencontractserver.documents.models.DocumentPath``. Those models
# declare their default manager as ``PermissionedTreeQuerySet.as_manager
# (with_tree_fields=True)`` — a django-tree-queries helper that creates
# the manager class at runtime, which django-stubs' plugin cannot
# introspect to resolve reverse ``_set`` accessors. The error is a known
# limitation of the mypy_django_plugin with tree-queries (not a bug in
# this file); graduating those three models out of the baseline with
# proper manager typing will let us delete this disable.
[mypy-opencontractserver.users.models]
disable_error_code = django-manager-missing
# Same django-tree-queries / PermissionedTreeQuerySet limitation surfaces for
# LabelSet's reverse relation 'used_by_corpuses' from Corpus.label_set.
[mypy-opencontractserver.annotations.models]
disable_error_code = django-manager-missing
# Same django-tree-queries / PermissionedTreeQuerySet limitation surfaces for the
# DocumentPath self-relation and reverse relations from Document/Source models.
[mypy-opencontractserver.documents.models]
disable_error_code = django-manager-missing
# Same limitation again, for AgentConfiguration's reverse relation
# 'default_for_corpuses' from ``Corpus.default_agent``. Corpus declares its
# manager as ``PermissionedTreeQuerySet.as_manager(with_tree_fields=True)``,
# so the plugin cannot introspect it to resolve the reverse accessor — the
# identical cause already disabled for users/annotations/documents above.
# Note the sibling relation ``CorpusGroup.default_agent`` does NOT trip this:
# CorpusGroup overrides its manager to ``PermissionManager()``, which the
# plugin can introspect. Typing Corpus's manager properly removes the need
# for this entry and the three above it together.
[mypy-opencontractserver.agents.models]
disable_error_code = django-manager-missing
# ---------------------------------------------------------------------------
# Baseline: authority-pack and deep-research modules (issue #1331 workflow)
#
# These landed after the original baseline was drawn and carry the same class
# of errors it already covers -- overwhelmingly Optional narrowing that mypy
# cannot follow (``.first()`` results used directly in tests) and heterogeneous
# ``**dict`` unpacking into dataclass constructors, which mypy models as a
# single joined value type and therefore rejects against every field.
#
# Listed here rather than left failing so the hook stays green and genuinely
# new errors remain visible. Graduate them per docs/typing/README.md; the
# provider modules want a typed record-builder rather than dict unpacking,
# which is a real refactor and not a config change.
# ---------------------------------------------------------------------------
[mypy-config.graphql.authority_pack_api]
ignore_errors = True
[mypy-opencontractserver.enrichment.authority_import_artifacts]
ignore_errors = True
[mypy-opencontractserver.tests.research.test_research_report_service]
ignore_errors = True
[mypy-opencontractserver.tests.test_agent_temporal_grounding]
ignore_errors = True
[mypy-opencontractserver.tests.test_authority_import_artifacts]
ignore_errors = True
[mypy-opencontractserver.tests.test_authority_pack_api]
ignore_errors = True
[mypy-opencontractserver.tests.test_authority_targeted_import]
ignore_errors = True
[mypy-opencontractserver.tests.test_import_v2_reingest_remap]
ignore_errors = True
[mypy-opencontractserver.tests.test_workspace_service]
ignore_errors = True