Skip to content

Commit 7ee9e37

Browse files
committed
Add sphinx-copybutton
1 parent 0eefc87 commit 7ee9e37

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

docs/conf.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@
3131
# Add any Sphinx extension module names here, as strings. They can be extensions
3232
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
3333
extensions = [
34-
'sphinx.ext.autodoc',
35-
'sphinx.ext.viewcode',
36-
'sphinx.ext.intersphinx',
37-
'sphinx.ext.napoleon',
34+
'sphinx.ext.autodoc',
35+
'sphinx.ext.viewcode',
36+
'sphinx.ext.intersphinx',
37+
'sphinx.ext.napoleon',
38+
'sphinx_copybutton',
3839
]
3940

4041
autodoc_member_order = 'bysource'
@@ -53,7 +54,7 @@
5354

5455
# General information about the project.
5556
project = u'python-evdev'
56-
copyright = u'2012-2016, Georgi Valkov'
57+
copyright = u'2012-2022, Georgi Valkov'
5758

5859
# The version info for the project you're documenting, acts as replacement for
5960
# |version| and |release|, also used in various other places throughout the
@@ -258,3 +259,8 @@
258259

259260
# How to display URL addresses: 'footnote', 'no', or 'inline'.
260261
#texinfo_show_urls = 'footnote'
262+
263+
# Copybutton config
264+
#copybutton_prompt_text = r">>> "
265+
#copybutton_prompt_is_regexp = True
266+
#copybutton_only_copy_prompt_lines = True

requirements-dev.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
pytest>=3.4.0
2-
Sphinx>=1.7.0
1+
pytest ~= 7.1.0
2+
Sphinx ~= 4.4.0
3+
sphinx-copybutton ~= 0.5.0
34
bump2version
45
sphinx_rtd_theme
56
twine

0 commit comments

Comments
 (0)