You should write your copyright notice as a comment (a # before each line) and not as a docstring. Because the module-level docstring is expected to contain a general description of your module.
On Friday, 7 March 2025 at 01:49:54 UTC+2 Tom Diaz wrote: > We recently noticed that for every module of ours that we document with > the automodule directive, Sphinx picks up a copyright string if it's in > the same file. > > For example, consider a module named whatever.py: > > """ > Copyright (C) 2023 My Company, Inc. > """ > . > . > class MyWorstNightmare: > """ > This class contains test facilities to avoid serious problems: > *"""* > > Automodule will pick up the docstring "This class..." but also will stick > the copyright notice at the top of the generated document. > > That isn't a behavior we want, because the code being documented may have > a copyright notice a couple of years old, and we don't want readers to > confuse it with the copyright of the book that includes the automodule text. > > Is there a way to stop or work around this behavior? > > Thanks, > Tom > -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/sphinx-users/cc2b0854-704f-405b-a5d8-ec405fecf6d5n%40googlegroups.com.