Skip to content

Typed data#1647

Merged
JrooTJunior merged 3 commits intodev-3.xfrom
feature/1637-typed-data
Mar 1, 2025
Merged

Typed data#1647
JrooTJunior merged 3 commits intodev-3.xfrom
feature/1637-typed-data

Conversation

@JrooTJunior
Copy link
Member

Add TypedDict definitions for middleware context data to the dispatcher dependency injection docs.

So, now you can use aiogram.dispatcher.middleware.data.MiddlewareData directly or
extend it with your own data in the middlewares.

Fixes #1637

Introduced `MiddlewareData` and associated TypedDicts to type-hint middleware context data. Updated documentation to include usage examples and guidelines for extending the default middleware data. Also adjusted coverage configuration to exclude the new data module.
@github-actions github-actions bot added the 3.x Issue or PR for stable 3.x version label Mar 1, 2025
@github-actions
Copy link

github-actions bot commented Mar 1, 2025

✔️ Changelog found.

Thank you for adding a description of the changes

@codecov
Copy link

codecov bot commented Mar 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (8b4976b) to head (1d9f026).
Report is 1 commits behind head on dev-3.x.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           dev-3.x     #1647   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          487       486    -1     
  Lines        12320     12318    -2     
=========================================
- Hits         12320     12318    -2     
Flag Coverage Δ
unittests 100.00% <ø> (ø)

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

see 1 file with indirect coverage changes

@JrooTJunior JrooTJunior merged commit 843c1de into dev-3.x Mar 1, 2025
23 checks passed
@JrooTJunior JrooTJunior deleted the feature/1637-typed-data branch August 31, 2025 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.x Issue or PR for stable 3.x version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate data dictionary in middleware/handlers to Pydantic BaseModel

1 participant