Skip to content

Commit 79cfcda

Browse files
committed
REF: HTML: Don't Show Source Code button on module description
Needlessly copies full module source verbatim.
1 parent 357b450 commit 79cfcda

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pdoc/templates/html.mako

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
<%def name="ident(name)"><span class="ident">${name}</span></%def>
2929

3030
<%def name="show_source(d)">
31-
% if (show_source_code or git_link_template) and d.source and d.obj is not getattr(d.inherits, 'obj', None):
31+
% if (show_source_code or git_link_template) and \
32+
not isinstance(d, pdoc.Module) and d.source and \
33+
d.obj is not getattr(d.inherits, 'obj', None):
3234
<% git_link = format_git_link(git_link_template, d) %>
3335
% if show_source_code:
3436
<details class="source">

0 commit comments

Comments
 (0)