diff options
author | Joe Gordon <jogo@users.noreply.github.com> | 2022-10-03 14:19:02 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-03 14:19:02 -0700 |
commit | ab8bf324d19798cb2f741b53c67f6ad823aca89f (patch) | |
tree | 1e3b87a015837c611889975d2c742a1ec9bcdfd7 /pymemcache/client/hash.py | |
parent | 91787fd84fac5a39b4cdacf2f84d667817bfa401 (diff) | |
parent | 7c9557435b321331362df862034d5676fd65a8ae (diff) | |
download | pymemcache-ab8bf324d19798cb2f741b53c67f6ad823aca89f.tar.gz |
Merge pull request #426 from jogo/typing
Add more type annotations
Diffstat (limited to 'pymemcache/client/hash.py')
-rw-r--r-- | pymemcache/client/hash.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pymemcache/client/hash.py b/pymemcache/client/hash.py index 57b07db..e56517f 100644 --- a/pymemcache/client/hash.py +++ b/pymemcache/client/hash.py @@ -123,7 +123,7 @@ class HashClient: return "%s:%s" % server return server - def add_server(self, server, port=None): + def add_server(self, server, port=None) -> None: # To maintain backward compatibility, if a port is provided, assume # that server wasn't provided as a (host, port) tuple. if port is not None: @@ -140,7 +140,7 @@ class HashClient: self.clients[key] = client self.hasher.add_node(key) - def remove_server(self, server, port=None): + def remove_server(self, server, port=None) -> None: # To maintain backward compatibility, if a port is provided, assume # that server wasn't provided as a (host, port) tuple. if port is not None: @@ -422,7 +422,7 @@ class HashClient: def delete(self, key, *args, **kwargs): return self._run_cmd("delete", key, False, *args, **kwargs) - def delete_many(self, keys, *args, **kwargs): + def delete_many(self, keys, *args, **kwargs) -> bool: for key in keys: self._run_cmd("delete", key, False, *args, **kwargs) return True @@ -438,10 +438,10 @@ class HashClient: def touch(self, key, *args, **kwargs): return self._run_cmd("touch", key, False, *args, **kwargs) - def flush_all(self, *args, **kwargs): + def flush_all(self, *args, **kwargs) -> None: for client in self.clients.values(): self._safely_run_func(client, client.flush_all, False, *args, **kwargs) - def quit(self): + def quit(self) -> None: for client in self.clients.values(): self._safely_run_func(client, client.quit, False) |