baldwin 0.0.5__py3-none-any.whl → 0.0.7__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.

Potentially problematic release.


This version of baldwin might be problematic. Click here for more details.

baldwin/__init__.py CHANGED
@@ -1,2 +1,2 @@
1
1
  """Manage a home directory with Git."""
2
- __version__ = '0.0.5'
2
+ __version__ = '0.0.7'
baldwin/lib.py CHANGED
@@ -61,7 +61,8 @@ def init() -> None:
61
61
  def auto_commit() -> None:
62
62
  """Automated commit of changed and untracked files."""
63
63
  repo = get_repo()
64
- diff_items = [Path.home() / e.a_path for e in repo.index.diff(None)] # pragma: no cover
64
+ diff_items = [Path.home() / e.a_path for e in repo.index.diff(None)
65
+ if e.a_path is not None] # pragma: no cover
65
66
  items_to_add = [
66
67
  *[p for p in diff_items if p.exists()], *[
67
68
  x for x in (Path.home() / y
@@ -74,7 +75,7 @@ def auto_commit() -> None:
74
75
  repo.index.add(items_to_add)
75
76
  if items_to_remove:
76
77
  repo.index.remove(items_to_remove)
77
- if items_to_add or items_to_remove:
78
+ if items_to_add or items_to_remove or len(repo.index.diff('HEAD')) > 0:
78
79
  repo.index.commit(f'Automatic commit @ {datetime.now(tz=UTC).isoformat()}',
79
80
  committer=Actor('Auto-commiter', 'hgit@tat.sh'))
80
81
 
@@ -162,7 +163,8 @@ def format_(filenames: Iterable[Path | str] | None = None,
162
163
  """
163
164
  if filenames is None:
164
165
  repo = get_repo()
165
- filenames = (*(Path.home() / d.a_path for d in repo.index.diff(None)),
166
+ filenames = (*(Path.home() / d.a_path
167
+ for d in repo.index.diff(None) if d.a_path is not None),
166
168
  *(x for x in (Path.home() / y for y in repo.untracked_files)
167
169
  if x.is_file() and not is_binary(str(x))))
168
170
  if not (filenames := list(filenames)):
@@ -1,8 +1,7 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: baldwin
3
- Version: 0.0.5
3
+ Version: 0.0.7
4
4
  Summary: Simple tracking of your home directory with easy-to-read diffs.
5
- Home-page: https://github.com/Tatsh/baldwin
6
5
  License: MIT
7
6
  Keywords: command line,file management,git,version control
8
7
  Author: Andrew Udvare
@@ -12,17 +11,16 @@ Classifier: Development Status :: 2 - Pre-Alpha
12
11
  Classifier: Intended Audience :: Developers
13
12
  Classifier: License :: OSI Approved :: MIT License
14
13
  Classifier: Programming Language :: Python
15
- Classifier: Programming Language :: Python :: 3
16
14
  Classifier: Programming Language :: Python :: 3.12
17
15
  Classifier: Programming Language :: Python :: 3.13
18
16
  Classifier: Typing :: Typed
19
17
  Requires-Dist: binaryornot (>=0.4.4,<0.5.0)
20
- Requires-Dist: click (>=8.1.7,<9.0.0)
21
- Requires-Dist: gitpython (>=3.1.43,<4.0.0)
18
+ Requires-Dist: click (>=8.1.8,<9.0.0)
19
+ Requires-Dist: gitpython (>=3.1.44,<4.0.0)
22
20
  Requires-Dist: platformdirs (>=4.3.6,<5.0.0)
23
21
  Project-URL: Documentation, https://baldwin.readthedocs.org
24
- Project-URL: Issues, https://github.com/Tatsh/baldwin/issues
25
22
  Project-URL: Repository, https://github.com/Tatsh/baldwin
23
+ Project-URL: issues, https://github.com/Tatsh/baldwin/issues
26
24
  Description-Content-Type: text/markdown
27
25
 
28
26
  # Simple home directory versioning
@@ -34,7 +32,7 @@ Description-Content-Type: text/markdown
34
32
  ![PyPI - Version](https://img.shields.io/pypi/v/baldwin)
35
33
  ![GitHub tag (with filter)](https://img.shields.io/github/v/tag/Tatsh/baldwin)
36
34
  ![GitHub](https://img.shields.io/github/license/Tatsh/baldwin)
37
- ![GitHub commits since latest release (by SemVer including pre-releases)](https://img.shields.io/github/commits-since/Tatsh/baldwin/v0.0.5/master)
35
+ ![GitHub commits since latest release (by SemVer including pre-releases)](https://img.shields.io/github/commits-since/Tatsh/baldwin/v0.0.7/master)
38
36
 
39
37
  This is a conversion of my simple scripts to version my home directory with very specific excludes
40
38
  and formatting every file upon commit so that readable diffs can be generated.
@@ -0,0 +1,11 @@
1
+ baldwin/__init__.py,sha256=XBpZev4nqfkkKQd5YUoqlcJK0kO9lxPH48gypaHnU7c,62
2
+ baldwin/lib.py,sha256=_-lFY5lXRDRMYpUgWvAuC-3ljYwMDSLaUvWjOX1QIWE,7494
3
+ baldwin/main.py,sha256=08a70OZLyRBamntbCdhhBNKSk9mywu_2M085I_mDa-s,2131
4
+ baldwin/resources/default_gitattributes.txt,sha256=uGoWTSVgPmdGB2EUIROkTz3FikGpNGhdS95SuuvoCRo,984
5
+ baldwin/resources/default_gitignore.txt,sha256=oyxukNyK6F778C2jc7oIwosP7ou1WTdbuWwkpgGZtJA,3022
6
+ baldwin/resources/prettier.config.json,sha256=-Hher3B02YflULYn0IYOG_a-rDxpaaaQ0QXD30-5IgQ,387
7
+ baldwin-0.0.7.dist-info/LICENSE.txt,sha256=TDfksi5bdmmL5cu6tAiN1iL7k38hWR2KbUg0JkASPO4,1082
8
+ baldwin-0.0.7.dist-info/METADATA,sha256=thCF46_lMihnW2-ONI3bOjyJgY2qCgcw0Qmw3c1EGbU,4487
9
+ baldwin-0.0.7.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
10
+ baldwin-0.0.7.dist-info/entry_points.txt,sha256=1PNIgkO4Pmvb8BFPHPNzNHJtfRMqkbzaUWpBWPPmEhs,75
11
+ baldwin-0.0.7.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.9.1
2
+ Generator: poetry-core 2.0.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,4 +1,4 @@
1
1
  [console_scripts]
2
2
  bw=baldwin.main:baldwin_main
3
- hgit=baldwin.main:git
3
+ hgit=baldwin.main:git_main
4
4
 
@@ -1,11 +0,0 @@
1
- baldwin/__init__.py,sha256=zRCtDd8b2My-634tBj2VBVvjruhFu212tMF5HMQ3T8s,62
2
- baldwin/lib.py,sha256=O880lZ-cJGPMDF2ypg5iOyZy9tgBWO28yMJ7pL7wN0k,7369
3
- baldwin/main.py,sha256=08a70OZLyRBamntbCdhhBNKSk9mywu_2M085I_mDa-s,2131
4
- baldwin/resources/default_gitattributes.txt,sha256=uGoWTSVgPmdGB2EUIROkTz3FikGpNGhdS95SuuvoCRo,984
5
- baldwin/resources/default_gitignore.txt,sha256=oyxukNyK6F778C2jc7oIwosP7ou1WTdbuWwkpgGZtJA,3022
6
- baldwin/resources/prettier.config.json,sha256=-Hher3B02YflULYn0IYOG_a-rDxpaaaQ0QXD30-5IgQ,387
7
- baldwin-0.0.5.dist-info/LICENSE.txt,sha256=TDfksi5bdmmL5cu6tAiN1iL7k38hWR2KbUg0JkASPO4,1082
8
- baldwin-0.0.5.dist-info/METADATA,sha256=CRhbusv0AF5culT23DmwDS7qTsl2v1P7tXK4blRWaIY,4579
9
- baldwin-0.0.5.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
10
- baldwin-0.0.5.dist-info/entry_points.txt,sha256=Whfij6CPUG0wuXRYWf3VGkluV1jV32ysrGFdlWjFy9o,70
11
- baldwin-0.0.5.dist-info/RECORD,,