Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b640de6

Browse files
committed
Remove module docstring if docstrings are disabled cython#792.
1 parent 990ea05 commit b640de6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Cython/Compiler/ModuleNode.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ def extend_if_not_in(L1, L2):
8686
self.scope.merge_in(scope)
8787

8888
def analyse_declarations(self, env):
89-
if Options.embed_pos_in_docstring:
89+
if not Options.docstrings:
90+
env.doc = self.doc = None
91+
elif Options.embed_pos_in_docstring:
9092
env.doc = EncodedString(u'File: %s (starting at line %s)' % Nodes.relative_position(self.pos))
9193
if not self.doc is None:
9294
env.doc = EncodedString(env.doc + u'\n' + self.doc)

0 commit comments

Comments
 (0)