Skip to content

Support TypedDict field as Dict[str, Any]#237

Open
leameow wants to merge 1 commit intopython-desert:mainfrom
Flared:isra/support-typeddict
Open

Support TypedDict field as Dict[str, Any]#237
leameow wants to merge 1 commit intopython-desert:mainfrom
Flared:isra/support-typeddict

Conversation

@leameow
Copy link
Copy Markdown
Collaborator

@leameow leameow commented Nov 11, 2022

Title says it all. Nothing to fancy, just a simple mapping of TypedDict -> Dict[str, Any]

@leameow leameow self-assigned this Nov 11, 2022
@leameow leameow force-pushed the isra/support-typeddict branch from ee3a850 to 267e659 Compare November 11, 2022 18:03
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 11, 2022

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (0c43ff5) to head (59519a1).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #237   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines          472       499   +27     
  Branches        90        98    +8     
=========================================
+ Hits           472       499   +27     

☔ 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.

@leameow leameow force-pushed the isra/support-typeddict branch 7 times, most recently from f6f7a7a to 62f510a Compare November 17, 2022 14:36
@leameow
Copy link
Copy Markdown
Collaborator Author

leameow commented Nov 17, 2022

Moved to typing_inspect instead of homemade is_typeddict

@leameow
Copy link
Copy Markdown
Collaborator Author

leameow commented Nov 17, 2022

Look like 'inspect_typing' has a bug 😞

@leameow leameow force-pushed the isra/support-typeddict branch 3 times, most recently from 75750d5 to 7965492 Compare November 17, 2022 16:09
@leameow
Copy link
Copy Markdown
Collaborator Author

leameow commented Nov 17, 2022

It will require #238 to fix the coverage issue.

@leameow leameow force-pushed the isra/support-typeddict branch 2 times, most recently from 94308c3 to 82d0984 Compare November 18, 2022 15:32
Copy link
Copy Markdown
Member

@altendky altendky left a comment

Choose a reason for hiding this comment

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

I'd think it would be nice to support the hints provided by a TypedDict, but this seems a relevant step in that direction and useful on its own. Thanks.

There are a few tweaks I think I'd like. If they explode in your face and make a mess, let me know and we can move forward as is knowing that I may make an attempt at the changes myself after this.

@leameow leameow force-pushed the isra/support-typeddict branch 2 times, most recently from de8324f to 5ce23ac Compare November 27, 2022 21:44
@leameow
Copy link
Copy Markdown
Collaborator Author

leameow commented Nov 27, 2022

I addressed your comments! Thanks for the review

@leameow leameow force-pushed the isra/support-typeddict branch from 5ce23ac to 158f528 Compare November 27, 2022 21:47
@leameow leameow force-pushed the isra/support-typeddict branch from 158f528 to 59519a1 Compare November 27, 2022 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants