We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aee64aa commit 905fe80Copy full SHA for 905fe80
1 file changed
descript.py
@@ -7,17 +7,11 @@
7
def get_basename(file):
8
return path.splitext(file)[0]
9
10
-def is_regular_file(file):
11
- return path.isfile(file)
12
-
13
def has_same_basename(file, other_file):
14
return get_basename(file) == get_basename(other_file)
15
16
-def is_not_same_file(file, other_file):
17
- return file != other_file
18
19
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)
+ return path.isfile(other_file) and has_same_basename(file, other_file) and file != other_file
21
22
def get_duplicates(file):
23
return [other_file for other_file in listdir('.') if is_duplicate(file, other_file)]
0 commit comments