Adam Turner
ad61e41157
Drop support for Python 3.8 ( #11511 )
2023-07-25 02:07:23 +01:00
Adam Turner
18f8c0bfc8
Resolve lint errors from Ruff 0.0.254
2023-03-05 12:54:24 +00:00
Adam Turner
4c4745af9c
Fix various Ruff errors
2023-01-31 18:30:43 +00:00
Daniel Eades
1abb24e309
remove blanket 'noqas'
2022-12-16 16:50:24 +01:00
Adam Turner
4660b62de0
Drop Python 3.7
2022-09-27 18:31:47 +01: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
Takeshi KOMIYA
17a5a29f1e
Fix #7935 : autodoc: A default value inspect._empty conseals signatures
...
A function signature is not shown when the function has a parameter
having ``inspect._empty`` as its default value because Signature class
validates function signatures on instantiation.
2020-07-12 14:03:28 +09:00
John R. Lenton
61378fe048
Make sphinx.util.typing.stringify render optional unions better
...
Without this change, stringify(Optional[Union[int, str]]) returns
'Union[int, str, None]' rather than the expected 'Optional[...]'.
This change fixes that.
fixes : #7654
2020-05-11 17:20:45 +01:00
Takeshi KOMIYA
92491c0769
Fix autodoc: missing type annotation for variadic and keyword parameters (refs: #6574 )
2019-07-13 19:25:38 +09:00
Takeshi KOMIYA
880c47ff61
Fix #6347 : autodoc: crashes with a plain Tuple on Python 3.6 and 3.5
2019-05-29 00:51:01 +09:00
Takeshi KOMIYA
8b687ac304
Merge branch '1.8'
2018-11-01 01:24:12 +09:00
Takeshi KOMIYA
793792fafc
Fix #5480 : autodoc: unable to find type hints for unresolvable Forward references
2018-10-15 23:40:05 +09:00
Takeshi KOMIYA
40a2fdf315
test: Merge py3/test_util_inspect_py3.py to test_util_inspect.py
2018-09-22 16:36:10 +09:00
Takeshi KOMIYA
59a766d7d6
Fix #5322 : autodoc: `Any
` typehint causes formatting error
2018-08-22 19:57:27 +09:00
Takeshi KOMIYA
91650d89c9
Fix #5291 : autodoc crashed by ForwardRef types
2018-08-15 21:30:49 +09:00
Takeshi KOMIYA
e26dc81272
Fix autodoc: Optional types are wrongly rendered
2018-08-15 01:22:52 +09:00
Terence D. Honles
da45604485
handle NoneType as None
2018-08-10 11:58:08 -07:00
Dmitry Shachnev
1e11634d51
Add a failing test for formatting Tuple[int, str, int]
2018-07-13 21:21:49 +03:00
Takeshi KOMIYA
f7027049b1
Fix flake8 violations
2018-02-19 23:20:56 +09:00
Alex Grönholm
a1f6baaa81
Fix annotations formatting for plain typing.Callable
...
The typing.Callable class may be used without generic arguments, in which case it is equivalent to collections.abc.Callable.
2016-11-02 21:43:33 +02:00
shimizukawa
021974ed94
refs #2432 update for latest master
2016-10-19 01:08:07 +09:00
Takayuki SHIMIZUKAWA
340c6fb9f4
Merge pull request #2432 from agronholm/kwonlyargs
...
#2432 Fix unwanted * between varargs and keyword only args
2016-10-19 00:54:38 +09:00
Joost van Zwieten
099b58f7fe
ext.autodoc: fix formatting instance annotations
...
Currently `format_annotation` fails on instances, because instances don't have
`__module__` and `__qualname__` attributes. Defer building the
`qualified_name` of an annotation until we have established that the annotation
is a type.
2016-08-07 16:18:22 +02:00
Alex Grönholm
0beabaf4cf
Fix unwanted * between varargs and keyword only args
...
The * parameter must only be present when a holder for positional variable arguments is not present.
2016-04-09 17:35:32 +03:00
Andrey Vlasovskikh
dd32b7fdb2
Closes #1968 : Show extended type hints for function annotations that use 'typing' module
2015-07-31 21:26:32 +03:00