Skip to content

Commit 6ee9f63

Browse files
committed
Bump version and fix minor linter errors
1 parent 119b577 commit 6ee9f63

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

CHANGELOG.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
Changes
22
=======
3+
4+
4.0.2
5+
~~~~~
6+
* FIX: AttributeError on certain methods. #191
7+
38
4.0.1
49
~~~~~
510
* FIX: Profiling classmethods works again. #183

kernprof.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
import os
77
import sys
88
import threading
9-
import asyncio
10-
import concurrent.futures
9+
import asyncio # NOQA
10+
import concurrent.futures # NOQA
1111
import time
1212
from argparse import ArgumentError, ArgumentParser
1313

1414
# NOTE: This version needs to be manually maintained with the line_profiler
1515
# __version__ for now.
16-
__version__ = '4.0.1'
16+
__version__ = '4.0.2'
1717

1818
# Guard the import of cProfile such that 3.x people
1919
# without lsprof can still use this script.
@@ -132,7 +132,7 @@ def __exit__(self, exc_type, exc_val, exc_tb):
132132
class RepeatedTimer(object):
133133
"""
134134
Background timer for outputting file every n seconds.
135-
135+
136136
Adapted from
137137
https://stackoverflow.com/questions/474528/what-is-the-best-way-to-repeatedly-execute-a-function-every-x-seconds/40965385#40965385
138138
"""
@@ -161,6 +161,7 @@ def stop(self):
161161
self._timer.cancel()
162162
self.is_running = False
163163

164+
164165
def find_script(script_name):
165166
""" Find the script.
166167
@@ -209,8 +210,8 @@ def positive_float(value):
209210
parser.add_argument('-z', '--skip-zero', action='store_true',
210211
help="Hide functions which have not been called")
211212
parser.add_argument('-i', '--output-interval', type=int, default=0, const=0, nargs='?',
212-
help="Enables outputting of cumulative profiling results to file every n seconds. Uses the threading module."
213-
"Minimum value is 1 (second). Defaults to disabled.")
213+
help="Enables outputting of cumulative profiling results to file every n seconds. Uses the threading module."
214+
"Minimum value is 1 (second). Defaults to disabled.")
214215

215216
parser.add_argument('script', help='The python script file to run')
216217
parser.add_argument('args', nargs='...', help='Optional script arguments')
@@ -250,7 +251,6 @@ def positive_float(value):
250251
# kernprof.py's.
251252
sys.path.insert(0, os.path.dirname(script_file))
252253

253-
254254
if options.output_interval:
255255
rt = RepeatedTimer(max(options.output_interval, 1), prof.dump_stats, options.outfile)
256256
original_stdout = sys.stdout

line_profiler/line_profiler.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
f'Has it been compiled? Underlying error is ex={ex!r}'
1717
)
1818

19-
__version__ = '4.0.1'
19+
__version__ = '4.0.2'
2020

2121

2222
def load_ipython_extension(ip):
@@ -39,9 +39,11 @@ def is_generator(f):
3939
isgen = (f.__code__.co_flags & CO_GENERATOR) != 0
4040
return isgen
4141

42+
4243
def is_classmethod(f):
4344
return isinstance(f, classmethod)
4445

46+
4547
class LineProfiler(CLineProfiler):
4648
""" A profiler that records the execution times of individual lines.
4749
"""

0 commit comments

Comments
 (0)