Michael Lee
b46366e77d
Make all single-constraint TypeVars to use bounds
...
According to the documentation in the typing module, TypeVars cannot
have only a single constraint. Attempting to do so will actually result
in an exception at runtime. (However, this error is currently ignored
by mypy -- see https://github.com/python/mypy/pull/2626 for a related
pending pull request).
This commit changes all instances of TypeVars using a single constraint
(e.g. `T = TypeVar('T', Foo)`) to use bounds instead (e.g.
`T = TypeVar('T', bound=Foo)`.
This seems to be the correct fix for plistlib after reading the module
docs, but it's less obvious this is correct for unittest. The unittest
module originally had `_FT = TypeVar('_FT', Callable[[Any], Any])` -- an
alternative fix would have been to do `_FT = Callable[[Any], Any]`.
Although I'm not entirely sure what it means to have a bound be a
Callable, I decided to make the assumption that the original authors
probably meant to use TypeVars instead of type aliases for a reason
(possibly to handle classes implementing `__call__`?)
2017-01-01 11:34:19 -08:00
..
2016-12-19 22:09:35 -08:00
2016-12-20 02:28:12 -08:00
2016-12-20 02:28:12 -08:00
2016-12-21 01:15:26 -08:00
2015-11-09 13:55:02 -08:00
2016-12-19 22:09:35 -08:00
2016-12-21 01:15:26 -08:00
2016-12-20 01:39:18 -08:00
2016-12-21 01:06:52 -08:00
2016-12-20 01:39:18 -08:00
2016-12-20 02:28:12 -08:00
2016-12-20 02:28:12 -08:00
2017-01-01 11:34:19 -08:00
2016-12-21 01:15:26 -08:00
2016-12-19 22:09:35 -08:00
2016-12-20 02:28:12 -08:00
2016-05-12 15:39:55 -07:00
2016-12-19 22:09:35 -08:00
2016-12-19 23:53:19 -08:00
2016-12-19 22:09:35 -08:00
2016-12-28 11:13:57 -08:00
2015-09-30 09:59:44 -07:00
2016-12-19 22:09:35 -08:00
2016-12-19 23:53:19 -08:00
2016-01-27 21:09:30 -08:00
2016-04-11 00:27:58 -04:00
2015-09-30 09:59:44 -07:00
2016-01-12 12:53:18 -08:00
2015-09-30 09:59:44 -07:00
2016-12-13 14:56:06 -08:00
2016-12-19 23:53:19 -08:00
2016-10-17 09:19:10 -07:00
2016-01-12 12:53:18 -08:00
2016-12-19 22:09:35 -08:00
2016-09-23 13:35:55 -07:00
2016-12-14 08:52:19 -08:00
2016-08-28 13:48:24 -07:00
2016-12-20 01:17:38 -08:00
2016-12-21 01:06:52 -08:00
2016-12-21 01:15:26 -08:00
2016-12-19 23:53:19 -08:00
2016-12-20 01:17:38 -08:00
2016-05-04 16:54:57 -07:00
2016-01-18 16:39:08 -08:00
2016-12-19 22:09:35 -08:00
2016-12-19 22:09:35 -08:00
2016-09-21 17:06:02 -07:00
2016-12-20 01:54:34 -08:00
2015-11-09 13:55:02 -08:00
2016-03-22 12:21:17 -07:00
2016-12-19 23:53:19 -08:00
2015-09-30 09:59:44 -07:00
2016-12-19 23:53:19 -08:00
2016-12-21 01:15:26 -08:00
2016-05-25 07:14:42 -07:00
2016-05-17 14:32:03 +01:00
2016-12-20 01:02:59 -08:00
2016-08-10 12:06:00 -07:00
2016-01-12 12:53:18 -08:00
2016-12-19 22:09:35 -08:00
2016-05-04 08:29:16 -07:00
2016-07-27 13:25:29 -07:00
2016-12-19 22:09:35 -08:00
2016-10-06 11:36:17 -07:00
2016-12-20 00:16:44 -08:00
2016-12-19 22:09:35 -08:00
2016-12-19 22:09:35 -08:00
2016-12-19 23:53:19 -08:00
2015-09-30 09:59:44 -07:00
2016-07-05 10:18:58 -07:00
2016-03-07 12:17:41 -08:00
2016-03-17 12:57:42 -07:00
2015-10-12 08:34:26 -07:00
2016-12-20 00:47:51 -08:00
2016-12-19 21:52:56 -08:00
2016-12-20 00:16:44 -08:00
2016-05-03 11:48:38 -07:00
2016-01-12 12:53:18 -08:00
2016-08-24 06:08:46 -07:00
2016-11-11 10:29:52 -08:00
2016-01-06 16:29:04 -08:00
2016-07-26 07:43:29 -07:00
2016-12-19 22:09:35 -08:00
2016-12-19 22:09:35 -08:00
2016-10-17 12:11:10 -07:00
2016-02-25 09:41:32 +00:00
2015-12-30 21:59:56 +01:00
2016-12-20 01:39:18 -08:00
2016-12-19 22:09:35 -08:00
2016-12-19 22:09:35 -08:00
2016-12-19 22:09:35 -08:00
2016-07-26 09:57:08 -07:00
2016-12-19 22:09:35 -08:00
2016-12-20 01:39:18 -08:00
2016-09-12 11:12:28 -07:00
2016-11-07 16:58:25 -08:00
2016-12-19 22:09:35 -08:00
2016-12-20 01:39:18 -08:00
2015-09-30 09:59:44 -07:00
2016-12-19 23:53:19 -08:00
2016-12-19 23:53:19 -08:00
2016-12-19 23:53:19 -08:00
2016-12-19 22:09:35 -08:00
2016-12-20 02:28:12 -08:00
2016-12-20 00:47:51 -08:00
2016-12-19 23:53:19 -08:00
2016-12-19 22:09:35 -08:00
2016-12-19 22:09:35 -08:00
2016-12-28 10:24:50 -08:00
2016-12-19 22:09:35 -08:00