diff options
author | Helmut Grohne <helmut@subdivi.de> | 2020-04-02 22:35:04 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2020-04-02 22:35:04 +0200 |
commit | be6834fe527823a64269c5ab1107af4c97882a44 (patch) | |
tree | 8d18e6f1d76df4e4a6f6d76704828e6e4d09a025 /wsgitools/filters.py | |
parent | b12055c53b09eababd1fa7260ecbe4e2e26425e9 (diff) | |
download | wsgitools-be6834fe527823a64269c5ab1107af4c97882a44.tar.gz |
avoid changing variable types
The mypy type checker deals badly when a binding changes its type. To
ease porting to mypy, avoid changing the type of variables. In some
cases, variables can be eliminated. In other cases, they are renamed.
Diffstat (limited to 'wsgitools/filters.py')
-rw-r--r-- | wsgitools/filters.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/wsgitools/filters.py b/wsgitools/filters.py index 60e4ebb..2a97066 100644 --- a/wsgitools/filters.py +++ b/wsgitools/filters.py @@ -388,8 +388,7 @@ class GzipWSGIFilter(BaseWSGIFilter): assert isinstance(environ, dict) if "HTTP_ACCEPT_ENCODING" in environ: acceptenc = environ["HTTP_ACCEPT_ENCODING"].split(',') - acceptenc = map(str.strip, acceptenc) - if "gzip" in acceptenc: + if "gzip" in map(str.strip, acceptenc): self.compress = True self.sio = io.BytesIO() self.gzip = gzip.GzipFile(fileobj=self.sio, mode="w") |