edir 2.37__tar.gz → 2.39__tar.gz

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.
@@ -1,12 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: edir
3
- Version: 2.37
3
+ Version: 2.39
4
4
  Summary: Utility to rename, remove, and copy files/dirs using your editor
5
5
  Author-email: Mark Blakeney <mark.blakeney@bullet-systems.net>
6
6
  License-Expression: GPL-3.0-or-later
7
7
  Project-URL: Homepage, https://github.com/bulletmark/edir
8
8
  Keywords: vidir,git,trash,trash-put,thrash-d
9
- Classifier: Programming Language :: Python :: 3
10
9
  Requires-Python: >=3.8
11
10
  Description-Content-Type: text/markdown
12
11
  Requires-Dist: argparse-from-file
@@ -210,7 +209,7 @@ following ways:
210
209
  list:
211
210
 
212
211
  1. Must start with a number and that number must be in range.
213
- 2. Must have at least one white space/tab after the number,
212
+ 2. Must have at least one white space and/or tab after the number,
214
213
  3. Must have a remaining valid path name.
215
214
  4. Can start with a `#` or be completely blank to be considered the
216
215
  same as deleted.
@@ -196,7 +196,7 @@ following ways:
196
196
  list:
197
197
 
198
198
  1. Must start with a number and that number must be in range.
199
- 2. Must have at least one white space/tab after the number,
199
+ 2. Must have at least one white space and/or tab after the number,
200
200
  3. Must have a remaining valid path name.
201
201
  4. Can start with a `#` or be completely blank to be considered the
202
202
  same as deleted.
@@ -1,12 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: edir
3
- Version: 2.37
3
+ Version: 2.39
4
4
  Summary: Utility to rename, remove, and copy files/dirs using your editor
5
5
  Author-email: Mark Blakeney <mark.blakeney@bullet-systems.net>
6
6
  License-Expression: GPL-3.0-or-later
7
7
  Project-URL: Homepage, https://github.com/bulletmark/edir
8
8
  Keywords: vidir,git,trash,trash-put,thrash-d
9
- Classifier: Programming Language :: Python :: 3
10
9
  Requires-Python: >=3.8
11
10
  Description-Content-Type: text/markdown
12
11
  Requires-Dist: argparse-from-file
@@ -210,7 +209,7 @@ following ways:
210
209
  list:
211
210
 
212
211
  1. Must start with a number and that number must be in range.
213
- 2. Must have at least one white space/tab after the number,
212
+ 2. Must have at least one white space and/or tab after the number,
214
213
  3. Must have a remaining valid path name.
215
214
  4. Can start with a `#` or be completely blank to be considered the
216
215
  same as deleted.
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "2.39",
3
+ "distance": 0,
4
+ "node": "gf9454a91e8fdb0f752566d32c0460354511fe85b",
5
+ "dirty": false,
6
+ "branch": "main",
7
+ "node_date": "2026-07-26"
8
+ }
@@ -289,7 +289,7 @@ class Fpath:
289
289
  tempdirs = set()
290
290
  natsort_key: Callable
291
291
 
292
- def __init__(self, path: Path):
292
+ def __init__(self, path: Path) -> None:
293
293
  "Class constructor"
294
294
  self.path = path
295
295
  self.newpath = None
@@ -312,14 +312,18 @@ class Fpath:
312
312
  self.diagrepr += SEP
313
313
 
314
314
  @staticmethod
315
- def inc_path(path: Path) -> Path:
315
+ def inc_path(path: Path, check_list: list[Path] | None = None) -> Path:
316
316
  "Find next unique file name"
317
317
  # Iterate forever, there can only be a finite number of existing
318
318
  # paths
319
+ if check_list is None:
320
+ check_list = []
321
+
319
322
  name = path.name
320
323
  for c in itertools.count():
321
- if not path.is_symlink() and not path.exists():
324
+ if not path.is_symlink() and not path.exists() and path not in check_list:
322
325
  break
326
+
323
327
  path = path.with_name(args._copy_name(name, c))
324
328
 
325
329
  return path
@@ -503,7 +507,7 @@ class Fpath:
503
507
  # Ensure consistent width for line numbers
504
508
  num_width = len(str(len(cls.paths)))
505
509
  fp.writelines(
506
- f'{i:0{num_width}} {p.linerepr}\n' for i, p in enumerate(cls.paths, 1)
510
+ f'{i:0{num_width}}\t{p.linerepr}\n' for i, p in enumerate(cls.paths, 1)
507
511
  )
508
512
 
509
513
  @classmethod
@@ -545,8 +549,7 @@ class Fpath:
545
549
  newpath = Path(pathstr)
546
550
 
547
551
  if path.newpath:
548
- if path.changed(newpath) and newpath not in path.copies:
549
- path.copies.append(newpath)
552
+ path.copies.append(cls.inc_path(newpath, path.copies))
550
553
  else:
551
554
  path.newpath = newpath
552
555
 
@@ -9,9 +9,6 @@ readme = "README.md"
9
9
  license = "GPL-3.0-or-later"
10
10
  requires-python = ">=3.8"
11
11
  keywords = ["vidir", "git", "trash", "trash-put", "thrash-d"]
12
- classifiers = [
13
- "Programming Language :: Python :: 3",
14
- ]
15
12
  dynamic = ["version"]
16
13
  dependencies = [
17
14
  "argparse-from-file",
@@ -31,21 +28,8 @@ edir = "edir:main"
31
28
  [tool.setuptools_scm]
32
29
  version_scheme = "post-release"
33
30
 
34
- [tool.mypy]
35
- implicit_optional = true
36
- warn_no_return = false
37
- allow_untyped_globals = true
38
- allow_redefinition = true
39
-
40
31
  [tool.ruff.format]
41
32
  quote-style = "single"
42
33
  skip-magic-trailing-comma = true
43
34
 
44
- [tool.edit-lint]
45
- linters = [
46
- "ruff check",
47
- "mypy",
48
- "pyright",
49
- ]
50
-
51
35
  # vim:se sw=2:
@@ -1,8 +0,0 @@
1
- {
2
- "tag": "2.37",
3
- "distance": 0,
4
- "node": "gf381879c1743e43f4d5c9b185ee48917a74b7ebe",
5
- "dirty": false,
6
- "branch": "main",
7
- "node_date": "2026-06-23"
8
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes