Commit Graph
28 Commits
Author SHA1 Message Date
Adam Turner 43e681e88f Remove `.egg support from pycode ModuleAnalyser`
Python eggs are a now-obsolete binary distribution format.
2023-03-05 19:03:06 +00:00
Adam Turner 4660b62de0 Drop Python 3.7 2022-09-27 18:31:47 +01:00
Adam Turner 7649eb1505 Clean up after dropping Python 3.6 2022-09-27 18:31:47 +01:00
Adam Turner 5775912455 Collapse single line docstrings 2022-02-20 03:13:45 +00:00
Adam Turner 6bb7b891a1 Remove copyright and licence fields 2022-02-20 03:06:23 +00:00
Adam Turner 5694e0ce60 Fix module docstring indentation 2022-02-20 00:35:13 +00:00
Adam Turner 4f5a3269a6 Fix module docstring first line 2022-02-20 00:11:08 +00:00
Adam Turner 6b8bccec59 Remove module titles in docstrings 2022-02-19 23:17:29 +00:00
Takeshi KOMIYA b84771dcd2 A happy new year! 2022-01-01 18:45:03 +09:00
Takeshi KOMIYA e7e08d2a78 Fix #9968: autodoc: ivars are not shown if __init__ has posonlyargs 2021-12-19 12:53:15 +09:00
Takeshi KOMIYA f996859420 A happy new year!
.. 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
2021-01-01 13:40:48 +09:00
Takeshi KOMIYA 21a3bd4127 refactor: Fix flake8 violations under tests/ directory 2020-11-15 17:15:40 +09:00
François Freitag 0949735210 Sort imports with isort
Keep imports alphabetically sorted and their order homogeneous across
Python source files.

The isort project has more feature and is more active than the
flake8-import-order plugin.

Most issues caught were simply import ordering from the same module.
Where imports were purposefully placed out of order, tag with
isort:skip.
2020-11-11 13:19:05 +01:00
François Freitag 5166dd194c Strip trailing whitespaces and normalize line endings
Trailing whitespace do not have impact on the result, they are just
unused bytes. Most text editors are configured to strip trailing
whitespaces. Remove them all in one go.

Update a handful of files to use the UNIX line ending.
2020-10-03 13:47:01 +02:00
Takeshi KOMIYA c8074b4a5d Deprecate sphinx.util:detect_encoding() and ModuleAnalyzer.encoding 2019-12-27 22:08:32 +09:00
hkm 0a982d5ebd Old get_module_source API restored, new version moved to ModuleAnalyzer class, tests updated 2019-12-25 22:29:20 +03:00
kpnr c4e60b5b9c restore sys.path with <finally> statement 2019-12-16 21:17:16 +03:00
hkm 1ca9dacbfe Added test case for non ASCII & non UTF8 encoding Windows-1251 in test_pycode section 2019-12-15 21:47:57 +03:00
hkm 264329079b Test suite updated - encoding not detected when getting sources from native loader 2019-12-15 20:50:27 +03:00
Jon Dufresne bade33c7e4 Remove unnecessary encoding cookie from Python source files
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.
2018-12-16 12:22:12 -08:00
Takeshi KOMIYA 3a2418a827 refactoring: Drop PY2 and PY3 flags 2018-09-22 21:27:59 +09:00
Takeshi KOMIYA 35e1764025 Fix #5290: autodoc: failed to analyze source code in egg package 2018-09-06 22:22:01 +09:00
Takeshi KOMIYA f7027049b1 Fix flake8 violations 2018-02-19 23:20:56 +09:00
Stephen Finucane 7c0723fd46 tests: Remove 'tests/run.py'
This is no longer necessary. One test needs to be modified to deal with
how 'python -m pytest' modifies the PATH.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2017-12-29 13:02:31 +00:00
Takeshi KOMIYA 8683823536 pycode: Replace pgen2 by own parser 2017-07-26 20:51:58 +09:00
Takeshi KOMIYA 57667b5766 Add testcase for oneliner 2017-07-26 20:51:40 +09:00
Takeshi KOMIYA ae3b761184 Add testcase for pycode interface 2017-07-26 20:51:40 +09:00
Takeshi KOMIYA 0df0a11cfa Add testcode for sphinx.pycode 2017-03-18 15:00:28 +09:00