Skip to content

Commit 72bbd73

Browse files
committed
Pylint fixes
1 parent ab1484d commit 72bbd73

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

diskcache/core.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -46,25 +46,25 @@ def __repr__(self):
4646
MODE_PICKLE = 4
4747

4848
DEFAULT_SETTINGS = {
49-
u'statistics': 0, # False
50-
u'tag_index': 0, # False
51-
u'eviction_policy': u'least-recently-stored',
52-
u'size_limit': 2 ** 30, # 1gb
53-
u'cull_limit': 10,
54-
u'sqlite_auto_vacuum': 1, # FULL
55-
u'sqlite_cache_size': 2 ** 13, # 8,192 pages
56-
u'sqlite_journal_mode': u'wal',
57-
u'sqlite_mmap_size': 2 ** 26, # 64mb
58-
u'sqlite_synchronous': 1, # NORMAL
59-
u'disk_min_file_size': 2 ** 15, # 32kb
60-
u'disk_pickle_protocol': pickle.HIGHEST_PROTOCOL,
49+
'statistics': 0, # False
50+
'tag_index': 0, # False
51+
'eviction_policy': 'least-recently-stored',
52+
'size_limit': 2 ** 30, # 1gb
53+
'cull_limit': 10,
54+
'sqlite_auto_vacuum': 1, # FULL
55+
'sqlite_cache_size': 2 ** 13, # 8,192 pages
56+
'sqlite_journal_mode': 'wal',
57+
'sqlite_mmap_size': 2 ** 26, # 64mb
58+
'sqlite_synchronous': 1, # NORMAL
59+
'disk_min_file_size': 2 ** 15, # 32kb
60+
'disk_pickle_protocol': pickle.HIGHEST_PROTOCOL,
6161
}
6262

6363
METADATA = {
64-
u'count': 0,
65-
u'size': 0,
66-
u'hits': 0,
67-
u'misses': 0,
64+
'count': 0,
65+
'size': 0,
66+
'hits': 0,
67+
'misses': 0,
6868
}
6969

7070
EVICTION_POLICY = {
@@ -1194,7 +1194,7 @@ def get(
11941194

11951195
try:
11961196
value = self._disk.fetch(mode, filename, db_value, read)
1197-
except IOError as error:
1197+
except IOError:
11981198
# Key was deleted before we could retrieve result.
11991199
if self.statistics:
12001200
sql(cache_miss)
@@ -1314,7 +1314,7 @@ def pop(
13141314

13151315
try:
13161316
value = self._disk.fetch(mode, filename, db_value, False)
1317-
except IOError as error:
1317+
except IOError:
13181318
# Key was deleted before we could retrieve result.
13191319
return default
13201320
finally:
@@ -1582,7 +1582,7 @@ def pull(
15821582

15831583
try:
15841584
value = self._disk.fetch(mode, name, db_value, False)
1585-
except IOError as error:
1585+
except IOError:
15861586
# Key was deleted before we could retrieve result.
15871587
continue
15881588
finally:
@@ -1696,7 +1696,7 @@ def peek(
16961696

16971697
try:
16981698
value = self._disk.fetch(mode, name, db_value, False)
1699-
except IOError as error:
1699+
except IOError:
17001700
# Key was deleted before we could retrieve result.
17011701
continue
17021702
finally:
@@ -1777,7 +1777,7 @@ def peekitem(self, last=True, expire_time=False, tag=False, retry=False):
17771777

17781778
try:
17791779
value = self._disk.fetch(mode, name, db_value, False)
1780-
except IOError as error:
1780+
except IOError:
17811781
# Key was deleted before we could retrieve result.
17821782
continue
17831783
break
@@ -1911,7 +1911,7 @@ def check(self, fix=False, retry=False):
19111911

19121912
rows = sql('PRAGMA integrity_check').fetchall()
19131913

1914-
if len(rows) != 1 or rows[0][0] != u'ok':
1914+
if len(rows) != 1 or rows[0][0] != 'ok':
19151915
for (message,) in rows:
19161916
warnings.warn(message)
19171917

0 commit comments

Comments
 (0)