Menu

#216 Fix type annotation for get_default_settings

None
open-accepted
nobody
None
5
2026-01-25
2026-01-22
No

It accepts classes themselves, not instances of those classes.

This fixes error from mypy that I have for code that calls get_default_settings(Writer).

error: Argument 1 to "get_default_settings" has incompatible type "type[Writer]"; expected "SettingsSpec"  [arg-type]
1 Attachments

Discussion

  • Günter Milde

    Günter Milde - 2026-01-25
    • status: open --> open-accepted
     
  • Günter Milde

    Günter Milde - 2026-01-25

    Applied in [r10294].
    Thank you for the patch.

     

    Related

    Commit: [r10294]


Log in to post a comment.