Skip to content

Commit 5c9c70f

Browse files
committed
Rewrite function call with set literal
1 parent b182920 commit 5c9c70f

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

cachecontrol/adapter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
class CacheControlAdapter(HTTPAdapter):
13-
invalidating_methods = set(['PUT', 'DELETE'])
13+
invalidating_methods = {'PUT', 'DELETE'}
1414

1515
def __init__(self, cache=None,
1616
cache_etags=True,

cachecontrol/heuristics.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,8 @@ class LastModified(BaseHeuristic):
100100
http://lxr.mozilla.org/mozilla-release/source/netwerk/protocol/http/nsHttpResponseHead.cpp#397
101101
Unlike mozilla we limit this to 24-hr.
102102
"""
103-
cacheable_by_default_statuses = set([
104-
200, 203, 204, 206, 300, 301, 404, 405, 410, 414, 501
105-
])
103+
cacheable_by_default_statuses = {200, 203, 204, 206, 300, 301, 404, 405,
104+
410, 414, 501}
106105

107106
def update_headers(self, resp):
108107
headers = resp.headers

0 commit comments

Comments
 (0)