mac-alias 2.2.1__tar.gz → 2.2.3__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.
Files changed (37) hide show
  1. mac_alias-2.2.3/.pre-commit-config.yaml +16 -0
  2. mac_alias-2.2.3/.readthedocs.yaml +19 -0
  3. {mac_alias-2.2.1 → mac_alias-2.2.3}/LICENSE +1 -0
  4. {mac_alias-2.2.1 → mac_alias-2.2.3}/PKG-INFO +22 -28
  5. {mac_alias-2.2.1 → mac_alias-2.2.3}/README.rst +6 -8
  6. {mac_alias-2.2.1 → mac_alias-2.2.3}/docs/alias_fmt.rst +1 -1
  7. {mac_alias-2.2.1 → mac_alias-2.2.3}/docs/conf.py +2 -2
  8. {mac_alias-2.2.1 → mac_alias-2.2.3}/docs/mac_alias.rst +6 -2
  9. mac_alias-2.2.3/pyproject.toml +131 -0
  10. mac_alias-2.2.3/setup.cfg +4 -0
  11. {mac_alias-2.2.1 → mac_alias-2.2.3}/src/mac_alias/__init__.py +3 -3
  12. {mac_alias-2.2.1 → mac_alias-2.2.3}/src/mac_alias/alias.py +14 -15
  13. {mac_alias-2.2.1 → mac_alias-2.2.3}/src/mac_alias/bookmark.py +8 -8
  14. {mac_alias-2.2.1 → mac_alias-2.2.3}/src/mac_alias.egg-info/PKG-INFO +23 -29
  15. {mac_alias-2.2.1 → mac_alias-2.2.3}/src/mac_alias.egg-info/SOURCES.txt +0 -4
  16. mac_alias-2.2.3/tox.ini +25 -0
  17. mac_alias-2.2.1/.pre-commit-config.yaml +0 -35
  18. mac_alias-2.2.1/.readthedocs.yaml +0 -29
  19. mac_alias-2.2.1/MANIFEST.in +0 -10
  20. mac_alias-2.2.1/pyproject.toml +0 -12
  21. mac_alias-2.2.1/setup.cfg +0 -75
  22. mac_alias-2.2.1/src/mac_alias.egg-info/not-zip-safe +0 -1
  23. mac_alias-2.2.1/src/mac_alias.egg-info/requires.txt +0 -14
  24. mac_alias-2.2.1/tox.ini +0 -49
  25. {mac_alias-2.2.1 → mac_alias-2.2.3}/docs/Makefile +0 -0
  26. {mac_alias-2.2.1 → mac_alias-2.2.3}/docs/_static/README.rst +0 -0
  27. {mac_alias-2.2.1 → mac_alias-2.2.3}/docs/bookmark_fmt.rst +0 -0
  28. {mac_alias-2.2.1 → mac_alias-2.2.3}/docs/index.rst +0 -0
  29. {mac_alias-2.2.1 → mac_alias-2.2.3}/docs/make.bat +0 -0
  30. {mac_alias-2.2.1 → mac_alias-2.2.3}/src/mac_alias/osx.py +0 -0
  31. {mac_alias-2.2.1 → mac_alias-2.2.3}/src/mac_alias/utils.py +0 -0
  32. {mac_alias-2.2.1 → mac_alias-2.2.3}/src/mac_alias.egg-info/dependency_links.txt +0 -0
  33. {mac_alias-2.2.1 → mac_alias-2.2.3}/src/mac_alias.egg-info/entry_points.txt +0 -0
  34. {mac_alias-2.2.1 → mac_alias-2.2.3}/src/mac_alias.egg-info/top_level.txt +0 -0
  35. {mac_alias-2.2.1 → mac_alias-2.2.3}/tests/__init__.py +0 -0
  36. {mac_alias-2.2.1 → mac_alias-2.2.3}/tests/test_alias.py +0 -0
  37. {mac_alias-2.2.1 → mac_alias-2.2.3}/tests/test_bookmark.py +0 -0
@@ -0,0 +1,16 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v6.0.0
4
+ hooks:
5
+ - id: check-toml
6
+ - id: check-yaml
7
+ - id: check-case-conflict
8
+ - id: check-docstring-first
9
+ - id: end-of-file-fixer
10
+ - id: trailing-whitespace
11
+ - repo: https://github.com/astral-sh/ruff-pre-commit
12
+ rev: v0.14.6
13
+ hooks:
14
+ - id: ruff-format
15
+ - id: ruff-check
16
+ args: [ --fix ]
@@ -0,0 +1,19 @@
1
+ # .readthedocs.yaml
2
+ # Read the Docs configuration file
3
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4
+
5
+ # Required
6
+ version: 2
7
+
8
+ # Set the version of Python and other tools you might need
9
+ build:
10
+ os: ubuntu-22.04
11
+ tools:
12
+ python: "3.12"
13
+ jobs:
14
+ pre_install:
15
+ - python -m pip install --upgrade pip
16
+ - python -m pip install --group tox
17
+ build:
18
+ html:
19
+ - python -m tox -e docs -- $READTHEDOCS_OUTPUT/html/
@@ -1,4 +1,5 @@
1
1
  Copyright (c) 2014 Alastair Houghton
2
+ Copyright (c) 2022 Russell Keith-Magee
2
3
 
3
4
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
5
  of this software and associated documentation files (the "Software"), to deal
@@ -1,62 +1,56 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: mac_alias
3
- Version: 2.2.1
4
- Summary: Generate/parse Mac OS Alias records from Python
5
- Home-page: http://alastairs-place.net/projects/mac_alias
6
- Author: Alastair Houghton
7
- Author-email: alastair@alastairs-place.net
8
- Maintainer: Russell Keith-Magee
9
- Maintainer-email: russell@keith-magee.com
10
- License: MIT License
11
- Project-URL: Source, https://github.com/al45stair/mac_alias
3
+ Version: 2.2.3
4
+ Summary: Generate/parse macOS Alias records from Python
5
+ Author-email: Alastair Houghton <alastair@alastairs-place.net>
6
+ Maintainer-email: Russell Keith-Magee <russell@keith-magee.com>
7
+ License-Expression: MIT
8
+ Project-URL: Documentation, https://mac-alias.readthedocs.io/en/latest/
9
+ Project-URL: Homepage, https://github.com/dmgbuild/mac_alias
10
+ Project-URL: Tracker, https://github.com/dmgbuild/mac_alias/issues
11
+ Project-URL: Source, https://github.com/dmgbuild/mac_alias
12
12
  Keywords: mac_alias
13
- Platform: darwin
14
13
  Classifier: Development Status :: 5 - Production/Stable
15
- Classifier: License :: OSI Approved :: MIT License
16
14
  Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3.7
18
- Classifier: Programming Language :: Python :: 3.8
19
- Classifier: Programming Language :: Python :: 3.9
20
15
  Classifier: Programming Language :: Python :: 3.10
21
16
  Classifier: Programming Language :: Python :: 3.11
22
17
  Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Programming Language :: Python :: 3.15
23
21
  Classifier: Programming Language :: Python :: 3 :: Only
24
22
  Classifier: Topic :: Desktop Environment
25
23
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
- Requires-Python: >=3.7
27
- Description-Content-Type: text/x-rst; charset=UTF-8
28
- Provides-Extra: dev
29
- Provides-Extra: test
30
- Provides-Extra: docs
24
+ Requires-Python: >=3.10
25
+ Description-Content-Type: text/x-rst
31
26
  License-File: LICENSE
27
+ Dynamic: license-file
32
28
 
33
29
  =========
34
30
  mac_alias
35
31
  =========
36
32
 
37
- .. image:: https://img.shields.io/pypi/pyversions/mac_alias.svg
33
+ .. |pyversions| image:: https://img.shields.io/pypi/pyversions/mac_alias.svg
38
34
  :target: https://pypi.python.org/pypi/mac_alias
39
35
  :alt: Python Versions
40
36
 
41
- .. image:: https://img.shields.io/pypi/v/mac_alias.svg
37
+ .. |version| image:: https://img.shields.io/pypi/v/mac_alias.svg
42
38
  :target: https://pypi.python.org/pypi/mac_alias
43
39
  :alt: PyPI Version
44
40
 
45
- .. image:: https://img.shields.io/pypi/status/mac_alias.svg
41
+ .. |maturity| image:: https://img.shields.io/pypi/status/mac_alias.svg
46
42
  :target: https://pypi.python.org/pypi/mac_alias
47
43
  :alt: Maturity
48
44
 
49
- .. image:: https://img.shields.io/pypi/l/mac_alias.svg
45
+ .. |license| image:: https://img.shields.io/pypi/l/mac_alias.svg
50
46
  :target: https://github.com/dmgbuild/mac_alias/blob/main/LICENSE
51
47
  :alt: MIT License
52
48
 
53
- .. image:: https://github.com/dmgbuild/mac_alias/workflows/CI/badge.svg?branch=main
49
+ .. |ci| image:: https://github.com/dmgbuild/mac_alias/workflows/CI/badge.svg?branch=main
54
50
  :target: https://github.com/dmgbuild/mac_alias/actions
55
51
  :alt: Build Status
56
52
 
57
- .. image:: https://readthedocs.org/projects/mac_alias/badge/?version=latest
58
- :target: http://mac_alias.readthedocs.io/en/latest/?badge=latest
59
- :alt: Docs Build Status
53
+ |pyversions| |version| |maturity| |license| |ci|
60
54
 
61
55
  What is this?
62
56
  -------------
@@ -2,29 +2,27 @@
2
2
  mac_alias
3
3
  =========
4
4
 
5
- .. image:: https://img.shields.io/pypi/pyversions/mac_alias.svg
5
+ .. |pyversions| image:: https://img.shields.io/pypi/pyversions/mac_alias.svg
6
6
  :target: https://pypi.python.org/pypi/mac_alias
7
7
  :alt: Python Versions
8
8
 
9
- .. image:: https://img.shields.io/pypi/v/mac_alias.svg
9
+ .. |version| image:: https://img.shields.io/pypi/v/mac_alias.svg
10
10
  :target: https://pypi.python.org/pypi/mac_alias
11
11
  :alt: PyPI Version
12
12
 
13
- .. image:: https://img.shields.io/pypi/status/mac_alias.svg
13
+ .. |maturity| image:: https://img.shields.io/pypi/status/mac_alias.svg
14
14
  :target: https://pypi.python.org/pypi/mac_alias
15
15
  :alt: Maturity
16
16
 
17
- .. image:: https://img.shields.io/pypi/l/mac_alias.svg
17
+ .. |license| image:: https://img.shields.io/pypi/l/mac_alias.svg
18
18
  :target: https://github.com/dmgbuild/mac_alias/blob/main/LICENSE
19
19
  :alt: MIT License
20
20
 
21
- .. image:: https://github.com/dmgbuild/mac_alias/workflows/CI/badge.svg?branch=main
21
+ .. |ci| image:: https://github.com/dmgbuild/mac_alias/workflows/CI/badge.svg?branch=main
22
22
  :target: https://github.com/dmgbuild/mac_alias/actions
23
23
  :alt: Build Status
24
24
 
25
- .. image:: https://readthedocs.org/projects/mac_alias/badge/?version=latest
26
- :target: http://mac_alias.readthedocs.io/en/latest/?badge=latest
27
- :alt: Docs Build Status
25
+ |pyversions| |version| |maturity| |license| |ci|
28
26
 
29
27
  What is this?
30
28
  -------------
@@ -49,7 +49,7 @@ Offset Size Contents
49
49
  28 4 Target CNID
50
50
  32 8 Target creation date (65536ths of a second since 1904-01-01 00:00:00 UTC)
51
51
  40 4 Volume attributes
52
- 54 14 Reserved (set to zero)
52
+ 44 14 Reserved (set to zero)
53
53
  ====== ==== ========
54
54
 
55
55
  This record is optionally followed by tag-length-value data:
@@ -59,7 +59,7 @@ copyright = "2014-2020, Alastair Houghton"
59
59
  # The full version, including alpha/beta/rc tags.
60
60
  with open("../src/mac_alias/__init__.py", encoding="utf8") as version_file:
61
61
  version_match = re.search(
62
- r"^__version__ = ['\"]([^'\"]*)['\"]", version_file.read(), re.M
62
+ r"^__version__ = ['\"]([^'\"]*)['\"]", version_file.read(), re.MULTILINE
63
63
  )
64
64
  if version_match:
65
65
  release = version_match.group(1)
@@ -112,7 +112,7 @@ pygments_style = "sphinx"
112
112
 
113
113
  # The theme to use for HTML and HTML Help pages. See the documentation for
114
114
  # a list of builtin themes.
115
- html_theme = "default"
115
+ html_theme = "furo"
116
116
 
117
117
  # Theme options are theme-specific and customize the look and feel of a theme
118
118
  # further. For a list of options available for each theme, see the
@@ -14,6 +14,10 @@ Classes
14
14
  :members:
15
15
  :undoc-members:
16
16
 
17
+ .. autoclass:: VolumeInfo
18
+ :members:
19
+ :undoc-members:
20
+
17
21
  .. autoclass:: TargetInfo
18
22
  :members:
19
23
  :undoc-members:
@@ -36,7 +40,7 @@ Constants
36
40
  .. py:data:: ALIAS_KIND_FILE
37
41
  ALIAS_KIND_FOLDER
38
42
 
39
- Values for the :attr:`~mac_alias.Alias.kind` attribute.
43
+ Values for the :attr:`TargetInfo.kind` attribute.
40
44
 
41
45
  .. py:data:: ALIAS_HFS_VOLUME_SIGNATURE
42
46
 
@@ -51,7 +55,7 @@ Constants
51
55
  ALIAS_FILESYSTEM_NTFS
52
56
  ALIAS_FILESYSTEM_UNKNOWN
53
57
 
54
- Values returned by the :attr:`~mac_alias.Alias.filesystem_type` attribute.
58
+ Values returned by the :attr:`VolumeInfo.filesystem_type` attribute.
55
59
 
56
60
  .. py:data:: ALIAS_FIXED_DISK
57
61
  ALIAS_NETWORK_DISK
@@ -0,0 +1,131 @@
1
+ [build-system]
2
+ requires = [
3
+ "setuptools==80.9.0",
4
+ ]
5
+ build-backend = "setuptools.build_meta"
6
+
7
+ [project]
8
+ dynamic = ["version"]
9
+ name = "mac_alias"
10
+ description = "Generate/parse macOS Alias records from Python"
11
+ readme = "README.rst"
12
+ requires-python = ">= 3.10"
13
+ license = "MIT"
14
+ license-files = [
15
+ "LICENSE",
16
+ ]
17
+ authors = [
18
+ {name="Alastair Houghton", email="alastair@alastairs-place.net"}
19
+ ]
20
+ maintainers = [
21
+ {name="Russell Keith-Magee", email="russell@keith-magee.com"}
22
+ ]
23
+ keywords = [
24
+ "mac_alias"
25
+ ]
26
+ classifiers = [
27
+ "Development Status :: 5 - Production/Stable",
28
+ "Programming Language :: Python :: 3",
29
+ "Programming Language :: Python :: 3.10",
30
+ "Programming Language :: Python :: 3.11",
31
+ "Programming Language :: Python :: 3.12",
32
+ "Programming Language :: Python :: 3.13",
33
+ "Programming Language :: Python :: 3.14",
34
+ "Programming Language :: Python :: 3.15",
35
+ "Programming Language :: Python :: 3 :: Only",
36
+ "Topic :: Desktop Environment",
37
+ "Topic :: Software Development :: Libraries :: Python Modules",
38
+ ]
39
+
40
+ [project.urls]
41
+ Documentation = "https://mac-alias.readthedocs.io/en/latest/"
42
+ Homepage = "https://github.com/dmgbuild/mac_alias"
43
+ Tracker = "https://github.com/dmgbuild/mac_alias/issues"
44
+ Source = "https://github.com/dmgbuild/mac_alias"
45
+
46
+ [project.scripts]
47
+ mac_alias = "mac_alias.__main__:main"
48
+
49
+ [dependency-groups]
50
+ package = [
51
+ "build == 1.2.1",
52
+ "twine == 6.1.0",
53
+ ]
54
+
55
+ pre-commit = [
56
+ "prek == 0.2.19",
57
+ ]
58
+
59
+ test = [
60
+ "coverage == 7.10.7",
61
+ "pytest == 8.4.2",
62
+ ]
63
+
64
+ tox = [
65
+ "tox-uv == 1.29.0"
66
+ ]
67
+
68
+ dev = [
69
+ {include-group = "pre-commit"},
70
+ {include-group = "test"},
71
+ {include-group = "tox"},
72
+ ]
73
+
74
+ # Docs are always built on Py3.12; see RTD and tox config files.
75
+ docs = [
76
+ "furo == 2025.9.25",
77
+ "sphinx == 8.2.3",
78
+ ]
79
+
80
+ [tool.setuptools.dynamic]
81
+ version = {attr = "mac_alias.__version__"}
82
+
83
+ [tool.coverage.run]
84
+ branch = true
85
+ relative_files = true
86
+ source_pkgs = ["mac_alias"]
87
+
88
+ [tool.coverage.paths]
89
+ source = [
90
+ "src",
91
+ "**/site-packages",
92
+ ]
93
+
94
+ [tool.coverage.report]
95
+ show_missing = true
96
+ skip_covered = true
97
+ skip_empty = true
98
+ precision = 1
99
+ exclude_lines = [
100
+ "pragma: no cover",
101
+ "@(abc\\.)?abstractmethod",
102
+ "NotImplementedError\\(\\)",
103
+ "if TYPE_CHECKING:",
104
+ ]
105
+
106
+ [tool.ruff.lint]
107
+ # In addition to the default rules, these additional rules will be used:
108
+ extend-select = [
109
+ "E", # pycodestyle
110
+ "W", # pycodestyle
111
+ "F", # pyflakes
112
+ # "UP", # pyupgrade
113
+ # "B", # flake8-bugbear
114
+ "YTT", # flake8-2020
115
+ "ASYNC", # flake8-async
116
+ "C4", # flake8-comprehensions
117
+ "I", # isort
118
+ # "RUF", # ruff-specific rules
119
+ "PT", # flake8-pytest-style
120
+ "FURB", # refurb
121
+ "ISC", # flake8-implicit-str-concat
122
+ "PGH", # pygrep-hooks
123
+ "T20", # flake8-print
124
+ "PIE", # flake8-pie
125
+ # "SIM", # flake8-simplify
126
+ ]
127
+
128
+ [tool.ruff.lint.per-file-ignores]
129
+ # F403: * import used; unable to detect undefined names
130
+ # F405: undefined, or defined from star imports
131
+ "src/mac_alias/__init__.py" = ["F403", "F405"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -1,8 +1,7 @@
1
- # flake8: noqa
2
1
  from .alias import *
3
2
  from .bookmark import *
4
3
 
5
- __version__ = "2.2.1"
4
+ __version__ = "2.2.3"
6
5
 
7
6
  __all__ = [
8
7
  "__version__",
@@ -23,7 +22,8 @@ __all__ = [
23
22
  "kBookmarkFileID",
24
23
  "kBookmarkFileCreationDate",
25
24
  "kBookmarkTOCPath",
26
- "kBookmarkVolumePath" "kBookmarkVolumeURL",
25
+ "kBookmarkVolumePath",
26
+ "kBookmarkVolumeURL",
27
27
  "kBookmarkVolumeName",
28
28
  "kBookmarkVolumeUUID",
29
29
  "kBookmarkVolumeSize",
@@ -71,9 +71,7 @@ class AppleShareInfo:
71
71
  self.user = user
72
72
 
73
73
  def __repr__(self):
74
- return "AppleShareInfo({!r},{!r},{!r})".format(
75
- self.zone, self.server, self.user
76
- )
74
+ return f"AppleShareInfo({self.zone!r},{self.server!r},{self.user!r})"
77
75
 
78
76
 
79
77
  class VolumeInfo:
@@ -171,7 +169,7 @@ class VolumeInfo:
171
169
  v = getattr(self, a)
172
170
  if v is not None:
173
171
  values.append(f"{a}={v!r}")
174
- return "VolumeInfo(%s)" % ",".join(values)
172
+ return "VolumeInfo({})".format(",".join(values))
175
173
 
176
174
 
177
175
  class TargetInfo:
@@ -255,9 +253,9 @@ class TargetInfo:
255
253
  values.append(repr(v))
256
254
 
257
255
  if self.levels_from != -1:
258
- values.append("levels_from=%r" % self.levels_from)
256
+ values.append(f"levels_from={self.levels_from!r}")
259
257
  if self.levels_to != -1:
260
- values.append("levels_to=%r" % self.levels_to)
258
+ values.append(f"levels_to={self.levels_to!r}")
261
259
 
262
260
  kwargs = [
263
261
  "folder_name",
@@ -270,7 +268,7 @@ class TargetInfo:
270
268
  v = getattr(self, a)
271
269
  values.append(f"{a}={v!r}")
272
270
 
273
- return "TargetInfo(%s)" % ",".join(values)
271
+ return "TargetInfo({})".format(",".join(values))
274
272
 
275
273
 
276
274
  TAG_CARBON_FOLDER_NAME = 0
@@ -476,7 +474,8 @@ class Alias:
476
474
  vol_path = st.f_mntonname
477
475
 
478
476
  # File and folder names in HFS+ are normalized to a form similar to NFD.
479
- # Must be normalized (NFD->NFC) before use to avoid unicode string comparison issues.
477
+ # Must be normalized (NFD->NFC) before use to avoid unicode string
478
+ # comparison issues.
480
479
  vol_path = normalize("NFC", vol_path.decode("utf-8")).encode("utf-8")
481
480
 
482
481
  # Grab its attributes
@@ -755,18 +754,18 @@ class Alias:
755
754
  return b.getvalue()
756
755
 
757
756
  def __str__(self):
758
- return "<Alias target=%s>" % self.target.filename
757
+ return f"<Alias target={self.target.filename}>"
759
758
 
760
759
  def __repr__(self):
761
760
  values = []
762
761
  if self.appinfo != b"\0\0\0\0":
763
- values.append("appinfo=%r" % self.appinfo)
762
+ values.append(f"appinfo={self.appinfo!r}")
764
763
  if self.version != 2:
765
- values.append("version=%r" % self.version)
764
+ values.append(f"version={self.version!r}")
766
765
  if self.volume is not None:
767
- values.append("volume=%r" % self.volume)
766
+ values.append(f"volume={self.volume!r}")
768
767
  if self.target is not None:
769
- values.append("target=%r" % self.target)
768
+ values.append(f"target={self.target!r}")
770
769
  if self.extra:
771
- values.append("extra=%r" % self.extra)
772
- return "Alias(%s)" % ",".join(values)
770
+ values.append(f"extra={self.extra!r}")
771
+ return "Alias({})".format(",".join(values))
@@ -190,7 +190,7 @@ class Data:
190
190
  self.bytes = bytes(bytedata)
191
191
 
192
192
  def __repr__(self):
193
- return "Data(%r)" % self.bytes
193
+ return f"Data({self.bytes!r})"
194
194
 
195
195
 
196
196
  class URL:
@@ -213,7 +213,7 @@ class URL:
213
213
  return urljoin(self.base.absolute, self.relative)
214
214
 
215
215
  def __repr__(self):
216
- return "URL(%r)" % self.absolute
216
+ return f"URL({self.absolute!r})"
217
217
 
218
218
 
219
219
  class Bookmark:
@@ -294,7 +294,7 @@ class Bookmark:
294
294
  elif dtype == BMK_NULL:
295
295
  return None
296
296
 
297
- print("Unknown data type %08x" % typecode)
297
+ print("Unknown data type %08x" % typecode) # noqa: T201
298
298
  return (typecode, databytes)
299
299
 
300
300
  @classmethod
@@ -310,7 +310,7 @@ class Bookmark:
310
310
  magic, size, dummy, hdrsize = struct.unpack(b"<4sIII", data[0:16])
311
311
 
312
312
  if magic not in (b"book", b"alis"):
313
- raise ValueError("Not a bookmark file (bad magic) %r" % magic)
313
+ raise ValueError(f"Not a bookmark file (bad magic) {magic!r}")
314
314
 
315
315
  if hdrsize < 16:
316
316
  raise ValueError("Not a bookmark file (header size too short)")
@@ -346,7 +346,7 @@ class Bookmark:
346
346
  raise ValueError("TOC entries overrun TOC size")
347
347
 
348
348
  toc = {}
349
- for n in range(0, toccount):
349
+ for n in range(toccount):
350
350
  ebase = tocbase + 20 + 12 * n
351
351
  eid, eoffset, edummy = struct.unpack(b"<III", data[ebase : ebase + 12])
352
352
 
@@ -458,7 +458,7 @@ class Bookmark:
458
458
  elif item is None:
459
459
  result = struct.pack(b"<II", 0, BMK_NULL | BMK_ST_ONE)
460
460
  else:
461
- raise ValueError("Unknown item type when encoding: %s" % item)
461
+ raise ValueError(f"Unknown item type when encoding: {item}")
462
462
 
463
463
  offset += len(result)
464
464
 
@@ -664,12 +664,12 @@ class Bookmark:
664
664
  def __repr__(self):
665
665
  result = ["Bookmark(["]
666
666
  for tid, toc in self.tocs:
667
- result.append("(0x%x, {\n" % tid)
667
+ result.append(f"(0x{tid:x}, {{\n")
668
668
  for k, v in toc.items():
669
669
  if isinstance(k, str):
670
670
  kf = repr(k)
671
671
  else:
672
- kf = "0x%04x" % k
672
+ kf = f"0x{k:04x}"
673
673
  result.append(f" {kf}: {v!r}\n")
674
674
  result.append("}),\n")
675
675
  result.append("])")
@@ -1,62 +1,56 @@
1
- Metadata-Version: 2.1
2
- Name: mac-alias
3
- Version: 2.2.1
4
- Summary: Generate/parse Mac OS Alias records from Python
5
- Home-page: http://alastairs-place.net/projects/mac_alias
6
- Author: Alastair Houghton
7
- Author-email: alastair@alastairs-place.net
8
- Maintainer: Russell Keith-Magee
9
- Maintainer-email: russell@keith-magee.com
10
- License: MIT License
11
- Project-URL: Source, https://github.com/al45stair/mac_alias
1
+ Metadata-Version: 2.4
2
+ Name: mac_alias
3
+ Version: 2.2.3
4
+ Summary: Generate/parse macOS Alias records from Python
5
+ Author-email: Alastair Houghton <alastair@alastairs-place.net>
6
+ Maintainer-email: Russell Keith-Magee <russell@keith-magee.com>
7
+ License-Expression: MIT
8
+ Project-URL: Documentation, https://mac-alias.readthedocs.io/en/latest/
9
+ Project-URL: Homepage, https://github.com/dmgbuild/mac_alias
10
+ Project-URL: Tracker, https://github.com/dmgbuild/mac_alias/issues
11
+ Project-URL: Source, https://github.com/dmgbuild/mac_alias
12
12
  Keywords: mac_alias
13
- Platform: darwin
14
13
  Classifier: Development Status :: 5 - Production/Stable
15
- Classifier: License :: OSI Approved :: MIT License
16
14
  Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3.7
18
- Classifier: Programming Language :: Python :: 3.8
19
- Classifier: Programming Language :: Python :: 3.9
20
15
  Classifier: Programming Language :: Python :: 3.10
21
16
  Classifier: Programming Language :: Python :: 3.11
22
17
  Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Programming Language :: Python :: 3.15
23
21
  Classifier: Programming Language :: Python :: 3 :: Only
24
22
  Classifier: Topic :: Desktop Environment
25
23
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
- Requires-Python: >=3.7
27
- Description-Content-Type: text/x-rst; charset=UTF-8
28
- Provides-Extra: dev
29
- Provides-Extra: test
30
- Provides-Extra: docs
24
+ Requires-Python: >=3.10
25
+ Description-Content-Type: text/x-rst
31
26
  License-File: LICENSE
27
+ Dynamic: license-file
32
28
 
33
29
  =========
34
30
  mac_alias
35
31
  =========
36
32
 
37
- .. image:: https://img.shields.io/pypi/pyversions/mac_alias.svg
33
+ .. |pyversions| image:: https://img.shields.io/pypi/pyversions/mac_alias.svg
38
34
  :target: https://pypi.python.org/pypi/mac_alias
39
35
  :alt: Python Versions
40
36
 
41
- .. image:: https://img.shields.io/pypi/v/mac_alias.svg
37
+ .. |version| image:: https://img.shields.io/pypi/v/mac_alias.svg
42
38
  :target: https://pypi.python.org/pypi/mac_alias
43
39
  :alt: PyPI Version
44
40
 
45
- .. image:: https://img.shields.io/pypi/status/mac_alias.svg
41
+ .. |maturity| image:: https://img.shields.io/pypi/status/mac_alias.svg
46
42
  :target: https://pypi.python.org/pypi/mac_alias
47
43
  :alt: Maturity
48
44
 
49
- .. image:: https://img.shields.io/pypi/l/mac_alias.svg
45
+ .. |license| image:: https://img.shields.io/pypi/l/mac_alias.svg
50
46
  :target: https://github.com/dmgbuild/mac_alias/blob/main/LICENSE
51
47
  :alt: MIT License
52
48
 
53
- .. image:: https://github.com/dmgbuild/mac_alias/workflows/CI/badge.svg?branch=main
49
+ .. |ci| image:: https://github.com/dmgbuild/mac_alias/workflows/CI/badge.svg?branch=main
54
50
  :target: https://github.com/dmgbuild/mac_alias/actions
55
51
  :alt: Build Status
56
52
 
57
- .. image:: https://readthedocs.org/projects/mac_alias/badge/?version=latest
58
- :target: http://mac_alias.readthedocs.io/en/latest/?badge=latest
59
- :alt: Docs Build Status
53
+ |pyversions| |version| |maturity| |license| |ci|
60
54
 
61
55
  What is this?
62
56
  -------------
@@ -1,10 +1,8 @@
1
1
  .pre-commit-config.yaml
2
2
  .readthedocs.yaml
3
3
  LICENSE
4
- MANIFEST.in
5
4
  README.rst
6
5
  pyproject.toml
7
- setup.cfg
8
6
  tox.ini
9
7
  docs/Makefile
10
8
  docs/alias_fmt.rst
@@ -23,8 +21,6 @@ src/mac_alias.egg-info/PKG-INFO
23
21
  src/mac_alias.egg-info/SOURCES.txt
24
22
  src/mac_alias.egg-info/dependency_links.txt
25
23
  src/mac_alias.egg-info/entry_points.txt
26
- src/mac_alias.egg-info/not-zip-safe
27
- src/mac_alias.egg-info/requires.txt
28
24
  src/mac_alias.egg-info/top_level.txt
29
25
  tests/__init__.py
30
26
  tests/test_alias.py
@@ -0,0 +1,25 @@
1
+ [tox]
2
+ envlist = docs,package,py{310,311,312,313,314,315}
3
+ skip_missing_interpreters = true
4
+
5
+ [testenv]
6
+ dependency_groups = test
7
+ commands =
8
+ python -m coverage run -m pytest -vv
9
+ python -m coverage report
10
+
11
+ [testenv:docs]
12
+ base_python = py312
13
+ build_dir = _build
14
+ change_dir = docs
15
+ dependency_groups = docs
16
+ commands =
17
+ python -m sphinx build --fail-on-warning --keep-going --jobs auto -n --verbose --fresh-env --show-traceback --write-all -d _build/doctrees --builder html . {posargs:_build/html}
18
+
19
+ [testenv:package]
20
+ skip_install = True
21
+ passenv = FORCE_COLOR
22
+ dependency_groups = package
23
+ commands =
24
+ python -m build --sdist --wheel --outdir dist/ .
25
+ python -m twine check dist/*
@@ -1,35 +0,0 @@
1
- repos:
2
- - repo: https://github.com/pre-commit/pre-commit-hooks
3
- rev: v4.3.0
4
- hooks:
5
- - id: check-toml
6
- - id: check-yaml
7
- - id: check-case-conflict
8
- - id: check-docstring-first
9
- - id: end-of-file-fixer
10
- - id: trailing-whitespace
11
- - repo: https://github.com/PyCQA/isort
12
- rev: 5.10.1
13
- hooks:
14
- - id: isort
15
- additional_dependencies: [toml]
16
- - repo: https://github.com/asottile/pyupgrade
17
- rev: v3.2.0
18
- hooks:
19
- - id: pyupgrade
20
- args: [--py37-plus]
21
- - repo: https://github.com/myint/docformatter
22
- rev: v1.5.0
23
- hooks:
24
- - id: docformatter
25
- args: [--in-place]
26
- - repo: https://github.com/psf/black
27
- rev: 22.10.0
28
- hooks:
29
- - id: black
30
- language_version: python3
31
- - repo: https://github.com/PyCQA/flake8
32
- rev: 5.0.4
33
- hooks:
34
- - id: flake8
35
- additional_dependencies: [flake8-eradicate==1.4.0]
@@ -1,29 +0,0 @@
1
- # .readthedocs.yaml
2
- # Read the Docs configuration file
3
- # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4
-
5
- # Required
6
- version: 2
7
-
8
- # Set the version of Python and other tools you might need
9
- build:
10
- os: ubuntu-20.04
11
- tools:
12
- python: "3.9"
13
-
14
- # Build documentation in the docs/ directory with Sphinx
15
- sphinx:
16
- builder: html
17
- configuration: docs/conf.py
18
-
19
- # If using Sphinx, optionally build your docs in additional formats such as PDF
20
- # formats:
21
- # - pdf
22
-
23
- # Optionally declare the Python requirements required to build your docs
24
- python:
25
- install:
26
- - method: pip
27
- path: .
28
- extra_requirements:
29
- - docs
@@ -1,10 +0,0 @@
1
- include tox.ini
2
- include pyproject.toml
3
- include .pre-commit-config.yaml
4
- include .readthedocs.yaml
5
- recursive-include docs *.bat
6
- recursive-include docs *.py
7
- recursive-include docs *.rst
8
- recursive-include docs Makefile
9
- recursive-exclude docs/_build *
10
- recursive-include tests *.py
@@ -1,12 +0,0 @@
1
- [build-system]
2
- requires = ["setuptools>=60"]
3
- build-backend = "setuptools.build_meta"
4
-
5
- [tool.isort]
6
- profile = "black"
7
- skip_glob = [
8
- "docs/conf.py",
9
- "venv*",
10
- "local",
11
- ]
12
- multi_line_output = 3
mac_alias-2.2.1/setup.cfg DELETED
@@ -1,75 +0,0 @@
1
- [metadata]
2
- name = mac_alias
3
- version = attr: mac_alias.__version__
4
- url = http://alastairs-place.net/projects/mac_alias
5
- project_urls =
6
- Source = https://github.com/al45stair/mac_alias
7
- author = Alastair Houghton
8
- author_email = alastair@alastairs-place.net
9
- maintainer = Russell Keith-Magee
10
- maintainer_email = russell@keith-magee.com
11
- classifiers =
12
- Development Status :: 5 - Production/Stable
13
- License :: OSI Approved :: MIT License
14
- Programming Language :: Python :: 3
15
- Programming Language :: Python :: 3.7
16
- Programming Language :: Python :: 3.8
17
- Programming Language :: Python :: 3.9
18
- Programming Language :: Python :: 3.10
19
- Programming Language :: Python :: 3.11
20
- Programming Language :: Python :: 3.12
21
- Programming Language :: Python :: 3 :: Only
22
- Topic :: Desktop Environment
23
- Topic :: Software Development :: Libraries :: Python Modules
24
- license = MIT License
25
- license_files =
26
- LICENSE
27
- description = Generate/parse Mac OS Alias records from Python
28
- long_description = file: README.rst
29
- long_description_content_type = text/x-rst; charset=UTF-8
30
- keywords =
31
- mac_alias
32
- platforms = darwin
33
-
34
- [options]
35
- zip_safe = False
36
- packages = find:
37
- python_requires = >= 3.7
38
- include_package_data = True
39
- package_dir =
40
- = src
41
-
42
- [options.packages.find]
43
- where = src
44
-
45
- [options.entry_points]
46
- console_scripts =
47
- mac_alias = mac_alias.__main__:main
48
-
49
- [options.extras_require]
50
- dev =
51
- pre-commit
52
- tox
53
- test =
54
- pytest
55
- pytest-tldr
56
- pytest-cov
57
- docs =
58
- sphinx
59
- sphinx-autobuild
60
- sphinx_rtd_theme
61
-
62
- [flake8]
63
- exclude = \
64
- .eggs/*,\
65
- build/*,\
66
- docs/*,\
67
- .tox/*,\
68
- venv*
69
- extend_ignore = C901,E203
70
- max-line-length = 119
71
-
72
- [egg_info]
73
- tag_build =
74
- tag_date = 0
75
-
@@ -1,14 +0,0 @@
1
-
2
- [dev]
3
- pre-commit
4
- tox
5
-
6
- [docs]
7
- sphinx
8
- sphinx-autobuild
9
- sphinx_rtd_theme
10
-
11
- [test]
12
- pytest
13
- pytest-tldr
14
- pytest-cov
mac_alias-2.2.1/tox.ini DELETED
@@ -1,49 +0,0 @@
1
- # Tox (http://tox.testrun.org/) is a tool for running tests
2
- # in multiple virtualenvs. This configuration file will run the
3
- # test suite on all supported python versions. To use it, "pip install tox"
4
- # and then run "tox" from this directory.
5
-
6
- [tox]
7
- envlist = flake8,docs,package,py{37,38,39,310,311,312}
8
- skip_missing_interpreters = true
9
- isolated_build = True
10
-
11
- [testenv]
12
- extras =
13
- test
14
- commands =
15
- pytest --cov -vv
16
- coverage xml
17
-
18
- [testenv:flake8]
19
- skip_install = True
20
- deps =
21
- flake8
22
- commands = flake8 {posargs}
23
-
24
- [testenv:docs]
25
- extras =
26
- docs
27
- commands =
28
- sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
29
-
30
- [testenv:package]
31
- skip_install = True
32
- deps =
33
- check_manifest
34
- build
35
- twine
36
- commands =
37
- check-manifest -v
38
- python -m build --sdist --wheel --outdir dist/ .
39
- python -m twine check dist/*
40
-
41
- [testenv:publish]
42
- deps =
43
- wheel
44
- twine
45
- passenv =
46
- TWINE_USERNAME
47
- TWINE_PASSWORD
48
- commands =
49
- python -m twine upload dist/*
File without changes
File without changes
File without changes
File without changes
File without changes