Skip to content

Commit 438b831

Browse files
committed
-
1 parent 59d7e74 commit 438b831

File tree

8 files changed

+7
-13
lines changed

8 files changed

+7
-13
lines changed

python_toolbox/cute_testing.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ def __init__(self, exception_type=Exception, text='',
4040
exception is of the exact `exception_type` specified, and not a
4141
subclass of it.
4242
'''
43-
ContextManager.__init__(self)
44-
4543
self.exception_type = exception_type
4644
'''The type of exception that should be raised.'''
4745

python_toolbox/monkeypatch_copy_reg.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
import copy_reg
1010
import types
11-
import __builtin__
1211

1312
from python_toolbox import import_tools
1413

python_toolbox/os_tools.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010

1111
def start_file(path):
12+
'''Open a file by launching the program that handles its kind.'''
1213
assert os.path.exists(path)
1314

1415
if sys.platform.startswith('linux'): # Linux:

python_toolbox/queue_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def iterate(queue, block=False, limit_to_original_size=False,
5050
"`_prefetch_if_no_qsize=True` to have the entire queue "
5151
"prefetched before yielding the items."
5252
)
53-
for i in xrange(queue.qsize()):
53+
for _ in xrange(queue.qsize()):
5454
try:
5555
yield queue.get(block=block)
5656
except queue_module.Empty:

python_toolbox/sequence_tools.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77
import itertools
88

99
from python_toolbox.nifty_collections import Counter
10-
from python_toolbox import caching
1110
from python_toolbox import math_tools
1211
from python_toolbox.infinity import infinity
13-
from python_toolbox.third_party import abc
1412
from python_toolbox.third_party import abcs_collection
1513

1614

python_toolbox/sys_tools.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66

77
from __future__ import with_statement
88

9-
import os
109
import sys
1110
import cStringIO
12-
import subprocess
1311

1412
from python_toolbox.context_managers import (ContextManager,
1513
BlankContextManager)

python_toolbox/version_info.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ class VersionInfo(tuple):
2828
_fields = ('major', 'minor', 'micro')
2929

3030

31-
def __new__(_cls, major, minor, micro):
31+
def __new__(cls, major, minor, micro):
3232
'''Create new instance of `VersionInfo(major, minor, micro)`.'''
33-
return tuple.__new__(_cls, (major, minor, micro))
33+
return tuple.__new__(cls, (major, minor, micro))
3434

3535

3636
@classmethod
@@ -54,12 +54,12 @@ def _asdict(self):
5454
return OrderedDict(zip(self._fields, self))
5555

5656

57-
def _replace(_self, **kwargs):
57+
def _replace(self, **kwargs):
5858
'''
5959
Make a `VersionInfo` object replacing specified fields with new values.
6060
'''
6161
result = \
62-
_self._make(map(kwargs.pop, ('major', 'minor', 'micro'),_self))
62+
self._make(map(kwargs.pop, ('major', 'minor', 'micro'), self))
6363
if kwargs:
6464
raise ValueError('Got unexpected field names: %r' % kwargs.keys())
6565
return result

python_toolbox/zip_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import fnmatch
1313

1414

15-
def zip_folder(folder, zip_path, ignored_patterns=[]):
15+
def zip_folder(folder, zip_path, ignored_patterns=()):
1616
'''
1717
Zip `folder` into a zip file specified by `zip_path`.
1818

0 commit comments

Comments
 (0)