Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
glyph committed Jan 29, 2022
1 parent 94af36e commit 8e2c4d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/treq/client.py
Expand Up @@ -55,7 +55,7 @@ def _scoped_cookiejar_from_dict(url_object, cookie_dict):
if cookie_dict is None:
return cookie_jar
for k, v in cookie_dict.items():
secure=(url_object.scheme == 'https')
secure = url_object.scheme == 'https'
port_specified = not (
(url_object.scheme == "https" and url_object.port == 443)
or (url_object.scheme == "http" and url_object.port == 80)
Expand Down
3 changes: 2 additions & 1 deletion src/treq/test/test_testing.py
Expand Up @@ -38,6 +38,7 @@ class _RedirectResource(Resource):
Resource that redirects to a different domain.
"""
isLeaf = True

def render(self, request):
if b'redirected' not in request.uri:
request.redirect(b'https://example.org/redirected')
Expand All @@ -51,6 +52,7 @@ def render(self, request):
request.requestHeaders.getAllRawHeaders()}
).encode("utf-8")


class _NonResponsiveTestResource(Resource):
"""Resource that returns NOT_DONE_YET and never finishes the request"""
isLeaf = True
Expand Down Expand Up @@ -344,7 +346,6 @@ def test_different_domains(self):
self.assertNotIn('not-across-redirect', received.get('Cookie', [''])[0])



class HasHeadersTests(TestCase):
"""
Tests for :obj:`HasHeaders`.
Expand Down

0 comments on commit 8e2c4d9

Please sign in to comment.