Menu

#216 Fix type annotation for get_default_settings

None
closed-accepted
nobody
None
5
2026-05-29
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]

  • Günter Milde

    Günter Milde - 2026-05-29
    • status: open-accepted --> closed-accepted
     
  • Günter Milde

    Günter Milde - 2026-05-29

    Fixed in Docutils 0.23.
    Thank you again for report and patch.

     

Log in to post a comment.