Skip to content

Commit bcf86dd

Browse files
committed
Revert "Merge with mypy master"
This reverts commit d49292d.
1 parent 436925e commit bcf86dd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+9109
-1745
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ python:
1515

1616
install:
1717
- pip install -r test-requirements.txt
18-
- python2 -m pip install --user typing
1918
- python setup.py install
2019

2120
script:

LICENSE

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ DEALINGS IN THE SOFTWARE.
2727
= = = = =
2828

2929
Portions of mypy are licensed under different licenses. The files
30-
under stdlib-samples are licensed under the PSF 2 License, reproduced below.
30+
under stdlib-samples and lib-typing are licensed under the PSF 2
31+
License, reproduced below.
3132

3233
= = = = =
3334

ROADMAP.md

Lines changed: 0 additions & 96 deletions
This file was deleted.

docs/source/cheat_sheet.rst

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -149,18 +149,6 @@ When you're puzzled or when things are complicated
149149
reveal_type(c) # -> error: Revealed type is 'builtins.list[builtins.str]'
150150
print(c) # -> [4] the object is not cast
151151
152-
# if you want dynamic attributes on your class, have it override __setattr__ or __getattr__
153-
# in a stub or in your source code.
154-
# __setattr__ allows for dynamic assignment to names
155-
# __getattr__ allows for dynamic access to names
156-
class A:
157-
# this will allow assignment to any A.x, if x is the same type as `value`
158-
def __setattr__(self, name, value):
159-
# type: (str, int) -> None
160-
...
161-
a.foo = 42 # works
162-
a.bar = 'Ex-parrot' # fails type checking
163-
164152
# TODO: explain "Need type annotation for variable" when
165153
# initializing with None or an empty container
166154

docs/source/cheat_sheet_py3.rst

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -142,19 +142,6 @@ When you're puzzled or when things are complicated
142142
reveal_type(c) # -> error: Revealed type is 'builtins.list[builtins.str]'
143143
print(c) # -> [4] the object is not cast
144144
145-
# if you want dynamic attributes on your class, have it override __setattr__ or __getattr__
146-
# in a stub or in your source code.
147-
# __setattr__ allows for dynamic assignment to names
148-
# __getattr__ allows for dynamic access to names
149-
class A:
150-
# this will allow assignment to any A.x, if x is the same type as `value`
151-
def __setattr__(self, name: str, value: int) -> None: ...
152-
# this will allow access to any A.x, if x is compatible with the return type
153-
def __getattr__(self, name: str) -> int: ...
154-
a.foo = 42 # works
155-
a.bar = 'Ex-parrot' # fails type checking
156-
157-
158145
# TODO: explain "Need type annotation for variable" when
159146
# initializing with None or an empty container
160147

docs/source/common_issues.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ not support ``sort()``) as a list and sort it in-place:
180180
# Type of x is List[int] here.
181181
x.sort() # Okay!
182182
183-
.. _variance:
183+
.. _invariance-vs-covariance:
184184

185185
Invariance vs covariance
186186
------------------------

docs/source/config_file.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,6 @@ overridden by the pattern sections matching the module name.
178178
- ``strict_boolean`` (Boolean, default False) makes using non-boolean
179179
expressions in conditions an error.
180180

181-
- ``no_implicit_optional`` (Boolean, default false) changes the treatment of
182-
arguments with a default value of None by not implicitly making their type Optional
183181

184182
Example
185183
*******

docs/source/revision_history.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ List of major changes:
3131

3232
* Add :ref:`variance-of-generics`.
3333

34-
* Add :ref:`variance`.
34+
* Add :ref:`invariance-vs-covariance`.
3535

3636
* Updates to :ref:`python-36`.
3737

extensions/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from distutils.core import setup
66

7-
version = '0.3.0-dev'
7+
version = '0.2.0'
88
description = 'Experimental type system extensions for programs checked with the mypy typechecker.'
99
long_description = '''
1010
Mypy Extensions

lib-typing/2.7/mod_generics_cache.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""Module for testing the behavior of generics across different modules."""
2+
3+
from typing import TypeVar, Generic
4+
5+
T = TypeVar('T')
6+
7+
8+
class A(Generic[T]):
9+
pass
10+
11+
12+
class B(Generic[T]):
13+
class A(Generic[T]):
14+
pass

0 commit comments

Comments
 (0)