Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 293b02c

Browse files
committed
small in commit, prepare for release
1 parent 40b5299 commit 293b02c

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

pydriller/domain/commit.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,10 @@ def changed_methods(self) -> List[Method]:
291291
added = self.diff_parsed['added']
292292
deleted = self.diff_parsed['deleted']
293293

294-
methods_changed_new = set([
295-
y for x in added for y in new_methods if y.start_line <= x[0] <= y.end_line])
296-
methods_changed_old = set(
297-
[y for x in deleted for y in old_methods if y.start_line <= x[0] <= y.end_line])
294+
methods_changed_new = {y for x in added for y in new_methods if
295+
y.start_line <= x[0] <= y.end_line}
296+
methods_changed_old = {y for x in deleted for y in old_methods if
297+
y.start_line <= x[0] <= y.end_line}
298298

299299
return list(methods_changed_new.union(methods_changed_old))
300300

@@ -304,19 +304,19 @@ def _calculate_metrics(self, include_before=False):
304304
for source_code_before, i.e. before the change happened
305305
"""
306306
if self.source_code and self._nloc is None:
307-
analysis = lizard.analyze_file.analyze_source_code(self.filename,
308-
self.source_code
309-
)
307+
analysis = lizard.analyze_file.analyze_source_code(
308+
self.filename, self.source_code)
310309
self._nloc = analysis.nloc
311310
self._complexity = analysis.CCN
312311
self._token_count = analysis.token_count
313312

314313
for func in analysis.function_list:
315314
self._function_list.append(Method(func))
316-
# logic to parse the methods before the change
317-
if include_before and self.source_code_before and not self._function_list_before:
318-
anal = lizard.analyze_file.analyze_source_code(self.filename,
319-
self.source_code_before)
315+
316+
if include_before and self.source_code_before and \
317+
not self._function_list_before:
318+
anal = lizard.analyze_file.analyze_source_code(
319+
self.filename, self.source_code_before)
320320

321321
self._function_list_before = [
322322
Method(x) for x in anal.function_list]

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def read_reqs(filename: str):
2929
long_description=long_description,
3030
author='Davide Spadini',
3131
author_email='[email protected]',
32-
version='1.11.2',
32+
version='1.12',
3333
packages=find_packages('.'),
3434
url='https://github.com/ishepard/pydriller',
3535
license='Apache License',

0 commit comments

Comments
 (0)