Skip to content

Commit

Permalink
Fixed mypy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Mar 17, 2017
1 parent 8f03b91 commit 78962da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions promise/dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def get_chunks(iterable_obj, chunk_size=1):
class DataLoader(object):

batch = True
max_batch_size = None
max_batch_size = None # type: int
cache = True

def __init__(self, batch_load_fn=None, batch=None, max_batch_size=None, cache=None, get_cache_key=None, cache_map=None):
Expand Down Expand Up @@ -47,7 +47,7 @@ def __init__(self, batch_load_fn=None, batch=None, max_batch_size=None, cache=No
self._promise_cache = cache_map or {}
self._queue = [] # type: List[Loader]

def get_cache_key(self, key):
def get_cache_key(self, key): # type: ignore
return key

def load(self, key=None):
Expand Down
4 changes: 2 additions & 2 deletions promise/promise.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@


def get_default_scheduler():
return async_instance.scheduler
return async_instance.schedule


def set_default_scheduler(scheduler):
async_instance.scheduler = scheduler
async_instance.schedule = scheduler


IS_PYTHON2 = version_info[0] == 2
Expand Down

0 comments on commit 78962da

Please sign in to comment.