File tree Expand file tree Collapse file tree 2 files changed +17
-17
lines changed Expand file tree Collapse file tree 2 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -459,19 +459,21 @@ def _function_wrapper(function):
459459 # makes for a nicely constructed sentence with or without any
460460 # of the parts.
461461
462- # If removed_in is a date, use "removed on"
463- # If removed_in is a version, use "removed in"
464- parts = {
465- "deprecated_in" :
466- f" { deprecated_in } " if deprecated_in else '' ,
467- "removed_in" :
468- f"\n This will be removed { 'on' if isinstance (removed_in , date ) else 'in' } { removed_in } ."
469- if removed_in else '' ,
470- "details" :
471- f" { details } " if details else ''
472- }
473-
474- deprecation_note = (".. deprecated::{deprecated_in}{removed_in}{details}" .format (** parts ))
462+ parts = {"deprecated_in" : '' , "removed_in" : '' , "details" : '' }
463+
464+ if deprecated_in :
465+ parts ["deprecated_in" ] = f" { deprecated_in } "
466+ if removed_in :
467+ # If removed_in is a date, use "removed on"
468+ # If removed_in is a version, use "removed in"
469+ if isinstance (removed_in , date ):
470+ parts ["removed_in" ] = f"\n This will be removed on { removed_in } ."
471+ else :
472+ parts ["removed_in" ] = f"\n This will be removed in { removed_in } ."
473+ if details :
474+ parts ["details" ] = f" { details } "
475+
476+ deprecation_note = (".. deprecated::{deprecated_in}{removed_in}{details}" .format_map (parts ))
475477
476478 # default location for insertion of deprecation note
477479 loc = 1
Original file line number Diff line number Diff line change @@ -254,10 +254,8 @@ def make_font(
254254 """ # noqa D400
255255
256256 font = Font ({
257- ** {char : unichar
258- for char , unichar in zip (ascii_uppercase , uppers )},
259- ** {char : unichar
260- for char , unichar in zip (ascii_lowercase , lowers )},
257+ ** dict (zip (ascii_uppercase , uppers )),
258+ ** dict (zip (ascii_lowercase , lowers )),
261259 })
262260
263261 if digits :
You can’t perform that action at this time.
0 commit comments