回答編集履歴

2

d

2020/08/11 02:07

投稿

tiitoi
tiitoi

スコア21960

test CHANGED
@@ -16,9 +16,9 @@
16
16
 
17
17
 
18
18
 
19
- def get_first_file(sub_dir):
19
+ def get_first_filename(sub_dir):
20
20
 
21
- paths = sorted([x.stem for x in sub_dir.iterdir()])
21
+ paths = sorted([x.stem for x in sub_dir.glob("*.txt")])
22
22
 
23
23
 
24
24
 

1

a

2020/08/11 02:07

投稿

tiitoi
tiitoi

スコア21960

test CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
 
12
12
 
13
- target_dir = Path("sample")
13
+ target_dir = Path("pystyle/opencv")
14
14
 
15
15
 
16
16
 
@@ -18,7 +18,7 @@
18
18
 
19
19
  def get_first_file(sub_dir):
20
20
 
21
- paths = sorted(sub_dir.glob("*.txt"))
21
+ paths = sorted([x.stem for x in sub_dir.iterdir()])
22
22
 
23
23
 
24
24