Skip to content

Commit

Permalink
🔧 run black, black --line-length 127 .
Browse files Browse the repository at this point in the history
  • Loading branch information
storkwrangler committed Oct 22, 2024
1 parent 629da5e commit 9ddce25
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
3 changes: 0 additions & 3 deletions tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2637,15 +2637,13 @@ def test_wsgi_query_string_with_encodechars(self):
@mock.patch()
@mock.patch(subprocess.Popen)
def test_create_handler_venv_win32_none_stderror_result(self, popen_mock):

class PopenMock:
return_code = 999

@classmethod
def communicate(cls):
return "valid_stdout", None # On win32, stderr can be None


popen_mock.return_value = PopenMock

boto_mock = mock.MagicMock()
Expand All @@ -2660,6 +2658,5 @@ def communicate(cls):
zappa_core.create_handler_venv()



if __name__ == "__main__":
unittest.main()
6 changes: 1 addition & 5 deletions zappa/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ def encode_response(status, headers, exc_info=None):
Related: https://github.com/Miserlou/Zappa/issues/1965
"""

new_headers = [
header
for header in headers
if isinstance(header[0], str) or header[0].lower() != "set-cookie"
]
new_headers = [header for header in headers if isinstance(header[0], str) or header[0].lower() != "set-cookie"]
cookie_headers = [
(header[0].lower(), header[1])
for header in headers
Expand Down

0 comments on commit 9ddce25

Please sign in to comment.