fileutils-dir 0.3.0__py3-none-any.whl → 0.3.5__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.
fileutils/files.py CHANGED
@@ -22,10 +22,8 @@ def in_dir(
22
22
  dtype=None,
23
23
  ) -> list[str]:
24
24
  """
25
- "in_dir() accepts only one positional argument (path).
26
- Use keyword arguments for filters or leave empty:
27
- in_dir(path, ext='filetype')
28
- in_dir(path, dtype='data_type')
25
+ Positional Arguments are not accepted except path.
26
+ Please specify extention (ext="") or data type (dtype="")
29
27
  dtype options: image, text, pdf, doc, sheet, presentation, code, data, audio, video, archive
30
28
  """
31
29
  if args:
@@ -35,14 +33,12 @@ def in_dir(
35
33
  " in_dir(path, ext='filetype')\n"
36
34
  " in_dir(path, dtype='data_type')"
37
35
  )
38
- ext = ext or []
39
- dtype = dtype or []
40
-
41
36
  if isinstance(ext, str):
42
37
  ext = [ext]
43
38
  if isinstance(dtype, str):
44
39
  dtype = [dtype]
45
-
40
+ ext = ext or []
41
+ dtype = dtype or []
46
42
  normalized_extensions = {
47
43
  e.lower() if e.startswith(".") else f".{e.lower()}"
48
44
  for e in ext
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fileutils-dir
3
- Version: 0.3.0
3
+ Version: 0.3.5
4
4
  Summary: Small utilities for listing files in directories
5
5
  Author: Jatavallabhula Sarat Anirudh
6
6
  License-Expression: MIT
@@ -0,0 +1,6 @@
1
+ fileutils/__init__.py,sha256=3u-pHKVodcCPECMcj95lrkk8nr7tl6_HRqiQOw6YbBM,78
2
+ fileutils/files.py,sha256=Kl0JEq2eaBf9kxp_wLBDB86d4wWSNAjDEokhDzExeak,2176
3
+ fileutils_dir-0.3.5.dist-info/METADATA,sha256=kWFpHtpkKl9oHzhWAbruJBGkpTBXbwhHzWPO3YkfzCw,1899
4
+ fileutils_dir-0.3.5.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
5
+ fileutils_dir-0.3.5.dist-info/top_level.txt,sha256=kZPCAZpYo7OkmwY_R2a4ifuMINdW5AZd2JaNHDSXQYQ,10
6
+ fileutils_dir-0.3.5.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- fileutils/__init__.py,sha256=3u-pHKVodcCPECMcj95lrkk8nr7tl6_HRqiQOw6YbBM,78
2
- fileutils/files.py,sha256=Aymj5dvKW8szLmSNUZvzAba6-_syJeTRPEPDkRHD6Jc,2274
3
- fileutils_dir-0.3.0.dist-info/METADATA,sha256=7Q6MibbNB_YSmDjnnHRZixGpzQ0mP4wAbxtLeFEJNX4,1899
4
- fileutils_dir-0.3.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
5
- fileutils_dir-0.3.0.dist-info/top_level.txt,sha256=kZPCAZpYo7OkmwY_R2a4ifuMINdW5AZd2JaNHDSXQYQ,10
6
- fileutils_dir-0.3.0.dist-info/RECORD,,