summaryrefslogtreecommitdiff
path: root/sphinx/util/fileutil.py
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Support and prefer ``.jinja`` to ``_t`` for static templates ↵James Addison2023-04-231-16/+3
| | | | | (#11165)" (#11329) This reverts commit 5d13215b58f93c6be8255ef2e3e20836508c7d47.
* Support and prefer ``.jinja`` to ``_t`` for static templates (#11165)James Addison2023-04-071-3/+16
| | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* Run pyupgrade (#11070)Adam Turner2023-01-021-3/+3
|
* Use PEP 604 typesAdam Turner2023-01-011-3/+3
|
* Use PEP 595 typesAdam Turner2023-01-011-3/+3
|
* Insert ``from __future__ import annotations``Adam Turner2023-01-011-0/+2
|
* Fix more strict static typing errors (#10681)danieleades2022-08-281-4/+5
|
* Collapse single line docstringsAdam Turner2022-02-201-2/+1
|
* Remove copyright and licence fieldsAdam Turner2022-02-201-3/+0
|
* Fix module docstring indentationAdam Turner2022-02-201-2/+2
|
* Fix module docstring first lineAdam Turner2022-02-201-2/+1
|
* Remove module titles in docstringsAdam Turner2022-02-191-3/+0
|
* A happy new year!Takeshi KOMIYA2022-01-011-1/+1
|
* Merge branch '3.x'Takeshi KOMIYA2021-01-011-1/+1
|\
| * A happy new year!Takeshi KOMIYA2021-01-011-1/+1
| | | | | | | | | | | | | | .. note:: $ find sphinx tests LICENSE doc/conf.py -type f -exec sed -i '' -e 's/2007\-20../2007-2021/' {} \; $ git co sphinx/locale/**/*.js sphinx/templates/epub3/mimetype
* | Do isortTakeshi KOMIYA2020-11-121-2/+1
| |
* | Merge branch '3.x' into masterTakeshi KOMIYA2020-10-031-5/+13
|\ \ | |/
| * Close #8100: html: Show a better error message for html_static_filesTakeshi KOMIYA2020-08-141-5/+13
| | | | | | | | | | | | The HTML Builder crashes if error raised on copying html_static_files. This handles the exception and show a better error message to let users the reason of errors (ex. failed on extracting Jinja templates).
* | Hello TYPE_CHECKING!Takeshi KOMIYA2020-03-071-2/+2
|/
* A happy new year!Takeshi KOMIYA2020-01-011-1/+1
|
* Migrate to py3 style type annotation: sphinx.util.fileutilTakeshi KOMIYA2019-06-021-7/+7
|
* Merge branch '1.8'Takeshi KOMIYA2019-01-021-1/+1
|\
| * A happy new year!Takeshi KOMIYA2019-01-021-1/+1
| |
* | Merge pull request #5509 from stephenfin/remove-future-importsTakeshi KOMIYA2018-12-171-1/+0
|\ \ | | | | | | Remove future imports
| * | py3: Remove (most) __future__ importsStephen Finucane2018-12-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two used: - print_function - absolute_import Both of these are mandatory in Python 3.0 onwards [1] and can therefore be removed...mostly. Unfortunately, mypy is still running in Python 2.7 mode, meaning we need the 'print_function' future wherever we're calling 'print' with the 'file' argument. There's also a single 'absolute_import' future that must be retained as its removal breaks a test for as-yet unknown reasons. TODOs are added to resolve both issues in the future. [1] https://docs.python.org/3/library/__future__.html Signed-off-by: Stephen Finucane <stephen@that.guru>
* | | 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.
* | Replace all "unicode" type by "str"Takeshi KOMIYA2018-12-151-3/+2
| |
* | 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-1/+1
| | | | | | | | | | | | | | | | | | 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').
* | Add sphinx.util.typing:unicode to help mypy-3 migrationTakeshi KOMIYA2018-11-241-0/+1
| |
* | Simplify ensuredir() with Python3 stdlib featuresJon Dufresne2018-11-201-1/+1
| | | | | | | | | | | | | | | | | | - Simplify ensuredir() to equivalent os.makedir(name, exist_ok=True) - Do not check if a directory exists before calling ensuredir() (ensuredir() already handles it) - Add exist_ok argument to path.makedirs() to follow same pattern - Drop unnecessary .exists() check immediately before .isdir() - Add tests for ensuredir
* | refactor: Separate message catalogs to sphinxmessage.styTakeshi KOMIYA2018-10-071-1/+1
| |
* | Deprecate Python2 compat shim sphinx.util.osutil.walk()Jon Dufresne2018-10-051-2/+2
| | | | | | | | | | Code should use os.walk() instead, which works with either str or bytes. All internal calls use str.
* | 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.
* Optimize copy_asset()Takeshi KOMIYA2018-05-021-0/+4
| | | | Instantiate default renderer object only once to reduce the cost.
* Revert "Use typing.TYPE_CHECKING for typehints"Takeshi KOMIYA2018-03-131-2/+2
| | | | This reverts commit a073e17537c2aacaac305feadea58d4473ec97f4.
* Use typing.TYPE_CHECKING for typehintsTakeshi KOMIYA2018-02-141-2/+2
|
* Use flake8-import-orderTakeshi KOMIYA2018-01-281-1/+3
|
* A happy new year!Takeshi KOMIYA2018-01-011-1/+1
|
* copy static files beyond symlinked directories under _static directory.shimizukawa2017-08-161-1/+1
| | | | This issue caused from ref #2744
* Update type annotations for new mypyTakeshi KOMIYA2017-05-071-1/+1
|
* Merge branch 'stable'Takeshi KOMIYA2017-03-261-1/+1
|\
| * Year++Takeshi KOMIYA2017-03-261-1/+1
| |
* | Upgrade to mypy-0.5Takeshi KOMIYA2017-03-031-1/+1
| |
* | Fix mypy violationsTakeshi KOMIYA2017-02-081-3/+11
|/
* Fix copy_asset_file() rewrote destination-filenameTakeshi KOMIYA2017-01-091-1/+3
|
* Fix #2687: Uninstall sphinx directives and roles after buildTakeshi KOMIYA2016-09-211-0/+2
|
* Fix importing errorTakeshi KOMIYA2016-07-081-1/+1
|
* Fix typoTakeshi KOMIYA2016-07-081-1/+1
|
* Use SphinxRenderer as a default renderer of copy_asset()Takeshi KOMIYA2016-07-071-6/+6
|