Commit Graph
13 Commits
Author SHA1 Message Date
David Euresti 5f4ad2b014 Update stubs for attrs 19.3.0 (#3900) 2020-04-02 20:14:53 +02:00
David Euresti c1953f2a00 Sync attr stubs from attrs github repo (#2720)
This include some changes like kw_only and some formatting changes.
2018-12-31 05:04:19 -08:00
David Euresti 4e40b035c8 BaseException does not take keyword arguments (#2348)
Fixes #2344
2018-07-27 13:28:43 -07:00
David Euresti 99f25d0cd3 Click: Make group and command decorators return the correct types (#2331) 2018-07-13 19:23:47 -07:00
David Euresti 2899d0a6aa Make click decorators not modify the type (#2322) 2018-07-11 12:35:05 -07:00
David Euresti 863b9b0886 Add new factory arg to attrib and fields_dict (#2096) 2018-05-04 07:53:52 -07:00
David Euresti 664d30c44b Fix attr.Factory signature (#2077)
The first overload was catching all calls including take_self=True.
Fix it by modifying the overloads.

Fixes https://github.com/python-attrs/attrs/issues/366
2018-04-23 12:27:14 -07:00
David Euresti 097e9f5e71 Fix issue with attrib ordering. (#1980)
A call like this:

```
from attr import attrib
from attr.validators import optional, instance_of

c = attrib(default=None, validator=optional(instance_of(bytes)))
```

Was returning no return value, because the first overload was T -> T.
The solution was to change the ordering so that the first overload is
None -> T and infer the type from the other arguments.
2018-03-22 10:50:07 -07:00
David Euresti df65f6ea15 Better type for click 'type' argument (#1903)
The call accepts tuples of types and callback methods
2018-03-06 21:41:21 -08:00
David Euresti 50c7188300 Work around mypy issue #4554 in attr.Factory (#1933)
This makes the following not give a type error:

   y: DefaultDict[str, List[int]] = Factory(lambda: defaultdict(list))
2018-03-05 19:21:14 -08:00
David Euresti 61e63293f1 Work around mypy issue #4554 in attrs. (#1914) 2018-02-24 13:00:15 -08:00
David Euresti 8ecb74012a Add __divmod__ to numeric types (#1900)
Helps with #1889
2018-02-18 16:59:12 -08:00
David Euresti fe5e12795f Fix signature of CaseInsensitiveDict (#1873)
The values can be more than just strings.
2018-02-11 08:19:39 -08:00