Skip to content

Commit 905fe80

Browse files
committed
inline simple functions
1 parent aee64aa commit 905fe80

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

descript.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,11 @@
77
def get_basename(file):
88
return path.splitext(file)[0]
99

10-
def is_regular_file(file):
11-
return path.isfile(file)
12-
1310
def has_same_basename(file, other_file):
1411
return get_basename(file) == get_basename(other_file)
1512

16-
def is_not_same_file(file, other_file):
17-
return file != other_file
18-
1913
def is_duplicate(file, other_file):
20-
return is_regular_file(other_file) and has_same_basename(file, other_file) and is_not_same_file(file, other_file)
14+
return path.isfile(other_file) and has_same_basename(file, other_file) and file != other_file
2115

2216
def get_duplicates(file):
2317
return [other_file for other_file in listdir('.') if is_duplicate(file, other_file)]

0 commit comments

Comments
 (0)