Skip to content

Replaced DocumentTypes type hint with DocumentTypesBase - #353

Merged
keighrim merged 2 commits into
developfrom
351-fix-type-hint
Feb 10, 2026
Merged

Replaced DocumentTypes type hint with DocumentTypesBase#353
keighrim merged 2 commits into
developfrom
351-fix-type-hint

Conversation

@keighrim

Copy link
Copy Markdown
Member

fixes#351

CopilotAI review requested due to automatic review settings January 29, 2026 22:24

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request fixes type hint issues in the mmif.Mmif class methods that were causing both pytype errors and runtime crashes when using DocumentTypes in type annotations.

Changes:

  • Updated type hints to use DocumentTypesBase instead of DocumentTypes or Any
  • Added DocumentTypesBase to imports in mmif/serialize/mmif.py

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadmmif/serialize/mmif.py Outdated
@codecov

codecovBot commented Jan 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.56%. Comparing base (53cc9df) to head (73da13e).
⚠️ Report is 9 commits behind head on develop.

Additional details and impacted files
@@ Coverage Diff @@## develop #353 +/- ##
========================================
Coverage 65.56% 65.56% ========================================
Files 22 22 Lines 2843 2843 ========================================
Hits 1864 1864 Misses 979 979 
FlagCoverage Δ
unittests65.56% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

marcverhagenand others added 2 commits January 29, 2026 18:09
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@keighrim
keighrim merged commit 03a9112 into developFeb 10, 2026
6 checks passed
@github-project-automationgithub-project-automationBot moved this from Todo to Done in infraFeb 10, 2026
@keighrim
keighrim deleted the 351-fix-type-hint branch February 14, 2026 01:23
@keighrimkeighrim mentioned this pull request Mar 10, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Type hints in mmif.Mmif

4 participants

@keighrim@clams-bot@marcverhagen