summaryrefslogtreecommitdiff
path: root/sphinx/ext/graphviz.py
Commit message (Collapse)AuthorAgeFilesLines
* Introduce fips safe sha1, see issue #7611Lars Hupfeldt2020-05-051-2/+1
|
* A happy new year!Takeshi KOMIYA2020-01-011-1/+1
|
* Close #6966: graphviz: Support ``:class:`` optionTakeshi KOMIYA2019-12-271-4/+8
|
* Migrate to py3 style type annotation: sphinx.ext.graphvizTakeshi KOMIYA2019-07-011-51/+33
|
* Close #5124: graphviz: :graphviz_dot: option is renamed to :layout:Takeshi KOMIYA2019-06-021-1/+4
|
* Merge pull request #6111 from tk0miya/6028_make_graphviz_reproducibleTakeshi KOMIYA2019-02-271-3/+1
|\ | | | | Fix #6028: graphviz: Ensure the graphviz filenames are reproducible
| * Fix #6028: graphviz: Ensure the graphviz filenames are reproducibleTakeshi KOMIYA2019-02-271-3/+1
| |
* | Use subprocess.run() instead of Popen()Takeshi KOMIYA2019-01-131-19/+13
| | | | | | | | | | | | Since python3.5, subprocess.run() has been introduced. It works a wrapper of Popen, and it looks much simple and better. This uses it instead of Popen to make our code simple.
* | Merge branch '1.8'Takeshi KOMIYA2019-01-021-1/+1
|\ \ | |/
| * A happy new year!Takeshi KOMIYA2019-01-021-1/+1
| |
* | Replace EnvironmentError and IOError by OSErrorTakeshi KOMIYA2018-12-191-5/+3
| | | | | | | | | | Since python 3.3, EnvironmentError and IOError were merged into OSError.
* | Merge pull request #5819 from jdufresne/coding-commentTakeshi KOMIYA2018-12-171-1/+0
|\ \ | | | | | | Remove unnecessary encoding cookie from Python source files
| * | Remove unnecessary encoding cookie from Python source filesJon Dufresne2018-12-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Python 3, the default encoding of source files is utf-8. The encoding cookie is now unnecessary and redundant so remove it. For more details, see the docs: https://docs.python.org/3/howto/unicode.html#the-string-type > The default encoding for Python source code is UTF-8, so you can > simply include a Unicode character in a string literal ... Includes a fix for the flake8 header checks to stop expecting an encoding cookie.
* | | Remove redundant coerce to str in string formattingJon Dufresne2018-12-161-4/+3
|/ / | | | | | | | | | | When an object is passed to a string format placeholder '%s', Python will implicitly call str() on the object. This applies to print() and logging as well.
* | Merge pull request #5803 from jdufresne/encoding-utf8Takeshi KOMIYA2018-12-161-3/+3
|\ \ | | | | | | Avoid respecifying default encoding for .encode()/.decode() calls
| * | Avoid respecifying default encoding for .encode()/.decode() callsJon Dufresne2018-12-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Python 3, both .encode() and .decode() default the encoding to 'utf-8'. See the docs: https://docs.python.org/3/library/stdtypes.html#str.encode https://docs.python.org/3/library/stdtypes.html#bytes.decode Simplify and shorten the code by using the default instead of respecifying it.
* | | Replace ENOENT errno checks with Python 3 FileNotFoundErrorJon Dufresne2018-12-151-4/+2
|/ / | | | | | | | | | | | | | | The error is more specific and self documenting. This removes the last use of sphinx.util.osutil.ENOENT, so it is now deprecated for removal. sphinx.util.osutil.EEXIST was already unused so that is deprecated as well.
* | Replace all "unicode" type by "str"Takeshi KOMIYA2018-12-151-12/+11
| |
* | Move to py3 mode for mypy (and remove many "type: ignore" comments)Takeshi KOMIYA2018-12-151-2/+2
| |
* | Simplify open() call by removing default modeJon Dufresne2018-12-111-2/+2
| | | | | | | | | | | | | | | | | | The open() function opens files in read-only text mode by default. Drop the mode argument to be slightly simpler and more idiomatic. https://docs.python.org/3/library/functions.html#open > The default mode is 'r' (open for reading text, synonym of 'rt').
* | Fix annotationsTakeshi KOMIYA2018-12-081-5/+1
| |
* | refactor figure_wrapper() using state.inline_text()Takeshi KOMIYA2018-12-041-7/+5
| |
* | Add SphinxTranslator as an abstract classTakeshi KOMIYA2018-12-031-2/+3
| |
* | Fix annotations for Directives (Replace N_co with nodes.Node)Takeshi KOMIYA2018-12-011-4/+4
| |
* | Fix annotations for extensionsTakeshi KOMIYA2018-12-011-12/+14
| |
* | Fix annotations for minor methods and functionsTakeshi KOMIYA2018-11-301-3/+3
| |
* | Fix annotaions for extensionsTakeshi KOMIYA2018-11-281-16/+20
| |
* | Add sphinx.util.typing:unicode to help mypy-3 migrationTakeshi KOMIYA2018-11-241-0/+1
| |
* | Merge branch '1.8'Takeshi KOMIYA2018-11-011-2/+2
|\ \ | |/
| * Correctly deal with non-existing static dir in graphviz extensionJeroen Demeyer2018-10-171-2/+2
| |
* | Merge branch '1.8'Takeshi KOMIYA2018-10-161-2/+2
|\ \ | |/
| * Fix mypy violationsTakeshi KOMIYA2018-10-161-2/+2
| |
* | Merge branch 'master' into HEADTakeshi KOMIYA2018-09-221-3/+2
|\ \
| * | Prefer builtin open() over io.open() and codecs.open()Jon Dufresne2018-09-111-3/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | In Python3, the functions io.open() is an alias of the builtin open() and codecs.open() is functionally equivalent. To reduce indirection, number of imports, and number of patterns, always prefer the builtin. https://docs.python.org/3/library/io.html#high-level-module-interface > io.open() > > This is an alias for the builtin open() function.
* | Remove unnecessary object from class definitionsJon Dufresne2018-09-111-1/+1
|/ | | | | In Python 3, all classes are new-style classes. The object in the definition is redundant and unnecessary.
* graphviz: Don't use document.current_sourceTakeshi KOMIYA2018-08-211-3/+1
|
* Merge branch 'master' into graphviz_width_of_svgTakeshi KOMIYA2018-08-071-3/+12
|\
| * graphviz: rename docpath -> docnameRok Roskar2018-08-061-3/+4
| |
| * graphviz: add document name to graphviz nodeRok Roskar2018-08-061-4/+8
| |
| * graphviz: make path construction more readableRok Roskar2018-08-061-2/+5
| |
| * graphviz: run dot in the document directoryRok Roskar2018-08-061-1/+2
| | | | | | | | | | | | addresses #4033 Co-authored-by: Jiri Kuncar <jiri.kuncar@gmail.com>
* | Fix #5002: graphviz: SVGs do not adapt to the column widthTakeshi KOMIYA2018-08-051-7/+22
|/
* refactor: Replace Directive by SphinxDirectiveTakeshi KOMIYA2018-05-111-8/+9
|
* Allow imgcls as class for SVG Graphviz <object>Michael Goerz2018-04-211-3/+5
| | | | | | | | | | | | | | | For consistency, the `<object>` tag for the SVG output of a inheritance-diagram should have the same `class="inheritance"` attribute that the corresponding `<img>` tag for the PNG format has. This allows to define the CSS attribute object.inheritance { max-width: 100%; } which for SVG (unlike PNG) actually works and makes sense. Added a test for inheritance-diagrams in SVG.
* Wrap graphviz diagrams in <div class="graphviz">Michael Goerz2018-04-201-4/+8
| | | | | | | | | | | | | | | | | | | | | | | The graphviz extension is modified to wrap the `<img>` and `<object>` tags it creates for diagrams in the png and svg formats in an additional `<div class="graphviz">...</div>` tag. This allows to apply additional CSS styling to the the diagrams that cannot be applied to `<img>` and `<object>` directly. Most notably, div.graphviz { overflow: auto; } would be a useful style that the standard themes might consider. In any case, it would allow users to add custom CSS code to their project that gets around the problems with inheritance-diagrams discussed in https://github.com/sphinx-doc/sphinx/issues/4865 The tests for the `grahviz` and `inheritance_diagram` have been modified to test for the presence of the additional `<div>` tag. Closes #4865
* Merge branch '1.7'Takeshi KOMIYA2018-03-181-2/+2
|\
| * Revert "Use typing.TYPE_CHECKING for typehints"Takeshi KOMIYA2018-03-131-2/+2
| | | | | | | | This reverts commit a073e17537c2aacaac305feadea58d4473ec97f4.
* | Merge branch 'master' into dont_stringify_exceptionsTakeshi KOMIYA2018-03-041-3/+3
|\ \
| * | Make console and warning messages translatableTakeshi KOMIYA2018-03-031-3/+3
| |/
* | Use six.text_type to stringify exceptionsTakeshi KOMIYA2018-03-031-3/+3
|/ | | | | On py2, an exception having i18nized message causes UnicodeError on stringify. This uses ``six.text_type()`` to stringify them instead.