Add check_untyped_defs (#15510)

* Add check_untyped_defs

* Change to regular if-else
This commit is contained in:
Andrey authored and Paulus Schoutsen committed 2018-07-18 00:28:44 +02:00
1 parent 7d7c2104ea
commit 24d2261060
15 files changed
+70 -44

No files matched your search

+5 -4
View File
@@ -13,7 +13,8 @@ from functools import wraps
from types import MappingProxyType
from unicodedata import normalize
from typing import Any, Optional, TypeVar, Callable, KeysView, Union, Iterable
from typing import (Any, Optional, TypeVar, Callable, KeysView, Union, # noqa
Iterable, List, Mapping)
from .dt import as_local, utcnow
@@ -150,9 +151,9 @@ class OrderedSet(MutableSet):
def __init__(self, iterable=None):
"""Initialize the set."""
self.end = end = []
end += [None, end, end] # sentinel node for doubly linked list
self.map = {} # key --> [key, prev, next]
self.end = end = [] # type: List[Any]
end += [None, end, end] # sentinel node for doubly linked list
self.map = {} # type: Mapping[List, Any] # key --> [key, prev, next]
if iterable is not None:
self |= iterable