-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3540 from rayl/fix-3348
Fix #3348: Show decorators in literalinclude and viewcode directives
- Loading branch information
Showing
8 changed files
with
93 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Literally included file using Python highlighting | ||
# -*- coding: utf-8 -*- | ||
|
||
@class_decorator | ||
@other_decorator() | ||
class TheClass(object): | ||
|
||
@method_decorator | ||
@other_decorator() | ||
def the_method(): | ||
pass | ||
|
||
@function_decorator | ||
@other_decorator() | ||
def the_function(): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
py-decorators | ||
============= | ||
|
||
Various decorators | ||
------------------ | ||
|
||
.. literalinclude:: py-decorators.inc | ||
:name: literal_include_pydecorators_1 | ||
:pyobject: TheClass | ||
|
||
.. literalinclude:: py-decorators.inc | ||
:name: literal_include_pydecorators_2 | ||
:pyobject: TheClass.the_method | ||
|
||
.. literalinclude:: py-decorators.inc | ||
:name: literal_include_pydecorators_3 | ||
:pyobject: the_function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters