Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

literalinclude pyobject and decorators #3348

Closed
tarekziade opened this issue Jan 16, 2017 · 0 comments · Fixed by #3540
Closed

literalinclude pyobject and decorators #3348

tarekziade opened this issue Jan 16, 2017 · 0 comments · Fixed by #3540

Comments

@tarekziade
Copy link

The literalinclude will not include decorators when the pyobject is used to point a callable that is prefixed by one or several decorators

tk0miya added a commit that referenced this issue Mar 12, 2017
Fix #3348: Show decorators in literalinclude and viewcode directives
cassella added a commit to cassella/pychapel that referenced this issue Jun 13, 2017
Particularly, harden them against code motion.

Use :end-before: instead of line numbers to stop the full program
listings before the test routines.  To this end, add a sentinel
comment line to the python programs where the literalinclude should
end.

Use the :pyobject: line-selection helper in the one case it applies --
the pure python quant().  It can't be used for the Chapel version
because it won't include the leading @chapel() with our current pinned
version of sphinx 1.3.6; fixed by sphinx-doc/sphinx#3348

The test_finance_chapel_numpy.py file that includes the @chapel()
quant is not included as a full file anywhere, only for this one
function and an import line, so use sentinel lines for those too.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant