@@ -582,13 +582,17 @@ def convert_source_suffix(app: Sphinx, config: Config) -> None:
582582 # The default filetype is determined on later step.
583583 # By default, it is considered as restructuredtext.
584584 config .source_suffix = {source_suffix : 'restructuredtext' }
585+ logger .info (__ ("Converting `source_suffix = %r` to `source_suffix = %r`." ),
586+ source_suffix , config .source_suffix )
585587 elif isinstance (source_suffix , (list , tuple )):
586588 # if list, considers as all of them are default filetype
587589 config .source_suffix = dict .fromkeys (source_suffix , 'restructuredtext' )
590+ logger .info (__ ("Converting `source_suffix = %r` to `source_suffix = %r`." ),
591+ source_suffix , config .source_suffix )
588592 elif not isinstance (source_suffix , dict ):
589- logger . warning ( __ ("The config value `source_suffix' expects "
590- "a string, list of strings, or dictionary. "
591- "But `%r' is given." % source_suffix ))
593+ msg = __ ("The config value `source_suffix' expects a dictionary, "
594+ "a string, or a list of strings. Got `%r' instead (type %s)." )
595+ raise ConfigError ( msg % ( source_suffix , type ( source_suffix ) ))
592596
593597
594598def convert_highlight_options (app : Sphinx , config : Config ) -> None :
0 commit comments