diff options
author | Marc Abramowitz <marc@marc-abramowitz.com> | 2014-06-09 07:59:01 -0700 |
---|---|---|
committer | Marc Abramowitz <marc@marc-abramowitz.com> | 2014-06-09 07:59:01 -0700 |
commit | 10a7dac0e40ee091b40a1b0af8b82343f92f6220 (patch) | |
tree | 5eed10f49144700c3a74c29fc2a45fde2ec46be5 | |
parent | 937143fc01af7bce8fee63cb4d66dd5a35ce5f84 (diff) | |
download | python-memcached-10a7dac0e40ee091b40a1b0af8b82343f92f6220.tar.gz |
Clean up long lines for pep8
-rw-r--r-- | memcache.py | 15 | ||||
-rw-r--r-- | setup.py | 32 |
2 files changed, 24 insertions, 23 deletions
diff --git a/memcache.py b/memcache.py index 822ba1d..564c0d8 100644 --- a/memcache.py +++ b/memcache.py @@ -884,8 +884,8 @@ class Client(threading.local): val = comp_val # silently do not store if value length exceeds maximum - if self.server_max_value_length != 0 and \ - len(val) > self.server_max_value_length: + if (self.server_max_value_length != 0 and + len(val) > self.server_max_value_length): return(0) return (flags, len(val), val) @@ -1171,14 +1171,14 @@ class Client(threading.local): # it's a separate type. if _has_unicode is True and isinstance(key, unicode): raise Client.MemcachedStringEncodingError( - "Keys must be str()'s, not unicode. Convert your unicode " - "strings using mystring.encode(charset)!") + "Keys must be str()'s, not unicode. Convert your unicode " + "strings using mystring.encode(charset)!") if not isinstance(key, str): raise Client.MemcachedKeyTypeError("Key must be str()'s") if isinstance(key, _str_cls): - if self.server_max_key_length != 0 and \ - len(key) + key_extra_len > self.server_max_key_length: + if (self.server_max_key_length != 0 and + len(key) + key_extra_len > self.server_max_key_length): raise Client.MemcachedKeyLengthError( "Key length is > %s" % self.server_max_key_length ) @@ -1386,7 +1386,8 @@ if __name__ == "__main__": def test_setget(key, val): global failures - print("Testing set/get {'%s': %s} ..." % (to_s(key), to_s(val)), end=" ") + print("Testing set/get {'%s': %s} ..." + % (to_s(key), to_s(val)), end=" ") mc.set(key, val) newval = mc.get(key) if newval == val: @@ -16,19 +16,19 @@ setup(name="python-memcached", py_modules=["memcache"], install_requires=open('requirements.txt').read().split(), classifiers=[ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "License :: OSI Approved :: Python Software Foundation License", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Topic :: Internet", - "Topic :: Software Development :: Libraries :: Python Modules", - "Programming Language :: Python", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 2.6", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.2", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4" - ]) + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "License :: OSI Approved :: Python Software Foundation License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Topic :: Internet", + "Topic :: Software Development :: Libraries :: Python Modules", + "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.6", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.2", + "Programming Language :: Python :: 3.3", + "Programming Language :: Python :: 3.4" + ]) |