xlin 0.1.14__py2.py3-none-any.whl → 0.1.15__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
xlin/util.py CHANGED
@@ -103,32 +103,12 @@ def rm(dir_path: Union[str, Path, List[str], List[Path]], filter: Callable[[Path
103
103
  filenames = os.listdir(dir_path)
104
104
  for filename in sorted(filenames):
105
105
  filepath = dir_path / filename
106
- if debug:
107
- print("checking", filepath)
108
- if filepath.is_dir():
109
- paths = ls(filepath, filter, expand_all_subdir)
110
- if len(paths) > 0:
111
- rm(paths, filter, expand_all_subdir)
112
- child = filepath
113
- while child.exists() and len(os.listdir(child)) > 0:
114
- child = child / os.listdir(child)[0]
115
- while child != filepath:
116
- if child.exists() and len(os.listdir(child)) == 0:
117
- child.rmdir()
118
- if debug:
119
- print(f"删除空文件夹 {child}")
120
- else:
121
- break
122
- if filepath.exists() and len(os.listdir(filepath)) == 0:
123
- filepath.rmdir()
124
- if debug:
125
- print(f"删除空文件夹 {filepath}")
126
- elif filter(filepath):
127
- rm(filepath, filter, expand_all_subdir)
128
- if dir_path.exists() and len(os.listdir(dir_path)) == 0:
129
- dir_path.rmdir()
130
- if debug:
131
- print(f"删除空文件夹 {dir_path}")
106
+ rm(filepath, filter, expand_all_subdir, debug)
107
+ if dir_path.exists() and dir_path.is_dir() and len(os.listdir(dir_path)) == 0:
108
+ if filter(dir_path):
109
+ dir_path.rmdir()
110
+ if debug:
111
+ print(f"删除空文件夹 {dir_path}")
132
112
 
133
113
 
134
114
  def cp(
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.1
2
2
  Name: xlin
3
- Version: 0.1.14
3
+ Version: 0.1.15
4
4
  Summary: toolbox for LinXueyuan
5
5
  License: MIT
6
6
  Author: XiChen
@@ -18,7 +18,6 @@ Classifier: Programming Language :: Python :: 3.9
18
18
  Classifier: Programming Language :: Python :: 3.10
19
19
  Classifier: Programming Language :: Python :: 3.11
20
20
  Classifier: Programming Language :: Python :: 3.12
21
- Classifier: Programming Language :: Python :: 3.13
22
21
  Requires-Dist: loguru
23
22
  Requires-Dist: pandas
24
23
  Requires-Dist: pyexcel
@@ -5,10 +5,10 @@ xlin/metric.py,sha256=N7wJ35y-C-IaBr1I1CJ_37lTG7gA69zmn9Xg6xSwKoI,1690
5
5
  xlin/multiprocess_mapping.py,sha256=pmzyEUYpbpIZ_ezyvWWWRpr7D7n4t3E3jW1nGXBbVck,7652
6
6
  xlin/read_as_dataframe.py,sha256=P8bOYW-zm8uGhehCldZI9ZQhHHLGqDPDbSMNWI2li6g,8885
7
7
  xlin/statistic.py,sha256=kp2P-Hr5Kb-R3dNgUXQieG8--iitjidg7SJuSiCpKdM,4131
8
- xlin/util.py,sha256=SOQUh506GQlljJYLYuI6nScSTOrgRQnMq2xfxSvKIlI,11303
8
+ xlin/util.py,sha256=RJHMBKC1xVwso3NfYXxIY3qqAfahzDDgzuU7jvNhQBA,10494
9
9
  xlin/xls2xlsx.py,sha256=5zfcM0gmunFQOcOj9nYd9Dj0HMhU7-cPKnPIy6Ot9iU,930
10
10
  xlin/yaml.py,sha256=kICi7G3Td5q2MaSXXt85qNTWoHMgjzt7pvn7r3C4dME,183
11
- xlin-0.1.14.dist-info/LICENSE,sha256=KX0dDCYlO4DskqMZY8qeY94EZMrDRNnNqlGLkXVlKyM,1063
12
- xlin-0.1.14.dist-info/METADATA,sha256=JPtTfnxHUAkSQzNhTBw9R5J0MP0vnNvQ_yKZ7IUJRRs,1140
13
- xlin-0.1.14.dist-info/WHEEL,sha256=aiTauIPAnqOMBuVimVqk4bevIILHLWXNdkzTocSR-tg,92
14
- xlin-0.1.14.dist-info/RECORD,,
11
+ xlin-0.1.15.dist-info/LICENSE,sha256=KX0dDCYlO4DskqMZY8qeY94EZMrDRNnNqlGLkXVlKyM,1063
12
+ xlin-0.1.15.dist-info/METADATA,sha256=GI2Hz1o2lX6rOSEm12phfhejUx1jG3yC29tkLUen6IA,1089
13
+ xlin-0.1.15.dist-info/WHEEL,sha256=IrRNNNJ-uuL1ggO5qMvT1GGhQVdQU54d6ZpYqEZfEWo,92
14
+ xlin-0.1.15.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.1
2
+ Generator: poetry-core 1.9.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2.py3-none-any
File without changes