git2svn 0.5.1__tar.gz → 0.5.2__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 (41) hide show
  1. {git2svn-0.5.1 → git2svn-0.5.2}/.github/workflows/ci.yml +7 -4
  2. {git2svn-0.5.1/git2svn.egg-info → git2svn-0.5.2}/PKG-INFO +2 -1
  3. {git2svn-0.5.1 → git2svn-0.5.2}/git2svn/__init__.py +3 -3
  4. {git2svn-0.5.1 → git2svn-0.5.2}/git2svn/_version.py +2 -2
  5. {git2svn-0.5.1 → git2svn-0.5.2}/git2svn/cli.py +1 -1
  6. {git2svn-0.5.1 → git2svn-0.5.2}/git2svn/core.py +1 -1
  7. git2svn-0.5.2/git2svn/py.typed +1 -0
  8. {git2svn-0.5.1 → git2svn-0.5.2}/git2svn/state.py +4 -2
  9. {git2svn-0.5.1 → git2svn-0.5.2/git2svn.egg-info}/PKG-INFO +2 -1
  10. {git2svn-0.5.1 → git2svn-0.5.2}/git2svn.egg-info/SOURCES.txt +1 -0
  11. {git2svn-0.5.1 → git2svn-0.5.2}/git2svn.egg-info/requires.txt +1 -0
  12. {git2svn-0.5.1 → git2svn-0.5.2}/git2svn.egg-info/scm_file_list.json +1 -0
  13. {git2svn-0.5.1 → git2svn-0.5.2}/pyproject.toml +18 -0
  14. {git2svn-0.5.1 → git2svn-0.5.2}/.githooks/pre-commit +0 -0
  15. {git2svn-0.5.1 → git2svn-0.5.2}/.github/dependabot.yml +0 -0
  16. {git2svn-0.5.1 → git2svn-0.5.2}/.github/workflows/release.yml +0 -0
  17. {git2svn-0.5.1 → git2svn-0.5.2}/.gitignore +0 -0
  18. {git2svn-0.5.1 → git2svn-0.5.2}/.pre-commit-config.yaml +0 -0
  19. {git2svn-0.5.1 → git2svn-0.5.2}/CONTRIBUTING.md +0 -0
  20. {git2svn-0.5.1 → git2svn-0.5.2}/LICENSE.md +0 -0
  21. {git2svn-0.5.1 → git2svn-0.5.2}/README.md +0 -0
  22. {git2svn-0.5.1 → git2svn-0.5.2}/docs/arc42/README.md +0 -0
  23. {git2svn-0.5.1 → git2svn-0.5.2}/docs/arc42/adrs.md +0 -0
  24. {git2svn-0.5.1 → git2svn-0.5.2}/docs/arc42/concepts.md +0 -0
  25. {git2svn-0.5.1 → git2svn-0.5.2}/docs/req42.md +0 -0
  26. {git2svn-0.5.1 → git2svn-0.5.2}/docs/user-guide/README.md +0 -0
  27. {git2svn-0.5.1 → git2svn-0.5.2}/docs/user-guide/commands.md +0 -0
  28. {git2svn-0.5.1 → git2svn-0.5.2}/docs/user-guide/integration-workflow.md +0 -0
  29. {git2svn-0.5.1 → git2svn-0.5.2}/docs/user-guide/troubleshooting.md +0 -0
  30. {git2svn-0.5.1 → git2svn-0.5.2}/git2svn/__main__.py +0 -0
  31. {git2svn-0.5.1 → git2svn-0.5.2}/git2svn/eol.py +0 -0
  32. {git2svn-0.5.1 → git2svn-0.5.2}/git2svn/git.py +0 -0
  33. {git2svn-0.5.1 → git2svn-0.5.2}/git2svn/patcher.py +0 -0
  34. {git2svn-0.5.1 → git2svn-0.5.2}/git2svn/svn.py +0 -0
  35. {git2svn-0.5.1 → git2svn-0.5.2}/git2svn.egg-info/dependency_links.txt +0 -0
  36. {git2svn-0.5.1 → git2svn-0.5.2}/git2svn.egg-info/entry_points.txt +0 -0
  37. {git2svn-0.5.1 → git2svn-0.5.2}/git2svn.egg-info/top_level.txt +0 -0
  38. {git2svn-0.5.1 → git2svn-0.5.2}/git2svn.py +0 -0
  39. {git2svn-0.5.1 → git2svn-0.5.2}/setup.cfg +0 -0
  40. {git2svn-0.5.1 → git2svn-0.5.2}/tests/test_e2e.py +0 -0
  41. {git2svn-0.5.1 → git2svn-0.5.2}/tests/test_git2svn.py +0 -0
@@ -7,8 +7,8 @@ on:
7
7
  branches: [ "main" ]
8
8
 
9
9
  jobs:
10
- lint-and-format:
11
- name: Lint & Format (Ruff)
10
+ lint-format-typecheck:
11
+ name: Lint, Format & Type Check
12
12
  runs-on: ubuntu-latest
13
13
  steps:
14
14
  - name: Check out repository
@@ -19,8 +19,8 @@ jobs:
19
19
  with:
20
20
  python-version: "3.12"
21
21
 
22
- - name: Install Ruff
23
- run: pip install ruff
22
+ - name: Install Tooling
23
+ run: pip install ruff mypy
24
24
 
25
25
  - name: Run Ruff Lint Checks
26
26
  run: ruff check .
@@ -28,6 +28,9 @@ jobs:
28
28
  - name: Verify Formatting with Ruff
29
29
  run: ruff format --check .
30
30
 
31
+ - name: Type Check with MyPy
32
+ run: mypy git2svn
33
+
31
34
  test:
32
35
  name: Test on Python ${{ matrix.python-version }} (${{ matrix.os }})
33
36
  runs-on: ${{ matrix.os }}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git2svn
3
- Version: 0.5.1
3
+ Version: 0.5.2
4
4
  Summary: CLI utility to synchronize changes from a local Git repository to a local SVN working copy
5
5
  Author: Simon
6
6
  License: Apache-2.0
@@ -26,6 +26,7 @@ Description-Content-Type: text/markdown
26
26
  License-File: LICENSE.md
27
27
  Provides-Extra: dev
28
28
  Requires-Dist: coverage>=7.0.0; extra == "dev"
29
+ Requires-Dist: mypy>=1.9.0; extra == "dev"
29
30
  Requires-Dist: ruff>=0.8.0; extra == "dev"
30
31
  Requires-Dist: setuptools-scm>=8.0; extra == "dev"
31
32
  Dynamic: license-file
@@ -20,7 +20,7 @@ from .state import (
20
20
  from .svn import SvnError, SvnLockError, SvnOutOfDateError, SvnWorkspace
21
21
 
22
22
  try:
23
- from ._version import __version__
23
+ from ._version import __version__ # type: ignore[import-not-found]
24
24
  except ImportError:
25
25
  __version__ = "0.0.0.dev0"
26
26
 
@@ -30,9 +30,9 @@ def get_version() -> str:
30
30
  try:
31
31
  from importlib.metadata import version
32
32
 
33
- return version("git2svn")
33
+ return str(version("git2svn"))
34
34
  except Exception:
35
- return __version__
35
+ return str(__version__)
36
36
 
37
37
 
38
38
  __all__ = [
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '0.5.1'
22
- __version_tuple__ = version_tuple = (0, 5, 1)
21
+ __version__ = version = '0.5.2'
22
+ __version_tuple__ = version_tuple = (0, 5, 2)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -224,7 +224,7 @@ def build_parser() -> argparse.ArgumentParser:
224
224
  def handle_setup(git_repo: GitRepo, svn_dir_path: Optional[Path | str]) -> int:
225
225
  """Automate repository configuration, branch detection, and productivity aliases."""
226
226
  if not git_repo.is_valid_repo():
227
- print(f"Error: '{git_repo.root_dir}' is not a valid Git repository.", file=sys.stderr)
227
+ print(f"Error: '{git_repo.repo_dir}' is not a valid Git repository.", file=sys.stderr)
228
228
  return 1
229
229
 
230
230
  # 1. Resolve SVN working copy path
@@ -591,7 +591,7 @@ class Synchronizer:
591
591
  is_single, start_ref, end_ref = parse_ref_arguments(default_range)
592
592
  if is_single:
593
593
  commits = [start_ref] if self.git.ref_exists(start_ref) else []
594
- merges = []
594
+ merges: List[str] = []
595
595
  else:
596
596
  assert end_ref is not None
597
597
  if not self.git.ref_exists(start_ref):
@@ -0,0 +1 @@
1
+ # Marker file for PEP 561. The git2svn package uses inline type annotations.
@@ -4,7 +4,7 @@ import json
4
4
  import logging
5
5
  import os
6
6
  from pathlib import Path
7
- from typing import Any, Dict, List, Optional
7
+ from typing import Any, Dict, List, Optional, cast
8
8
 
9
9
  logger = logging.getLogger("git2svn")
10
10
 
@@ -28,7 +28,9 @@ def load_replay_state(workspace_dir: Path) -> Optional[Dict[str, Any]]:
28
28
  path = get_replay_state_path(workspace_dir)
29
29
  if path.is_file():
30
30
  try:
31
- return json.loads(path.read_text(encoding="utf-8"))
31
+ val = json.loads(path.read_text(encoding="utf-8"))
32
+ if isinstance(val, dict):
33
+ return cast(Dict[str, Any], val)
32
34
  except Exception as e:
33
35
  logger.error("Failed to parse replay state file: %s", e)
34
36
  return None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git2svn
3
- Version: 0.5.1
3
+ Version: 0.5.2
4
4
  Summary: CLI utility to synchronize changes from a local Git repository to a local SVN working copy
5
5
  Author: Simon
6
6
  License: Apache-2.0
@@ -26,6 +26,7 @@ Description-Content-Type: text/markdown
26
26
  License-File: LICENSE.md
27
27
  Provides-Extra: dev
28
28
  Requires-Dist: coverage>=7.0.0; extra == "dev"
29
+ Requires-Dist: mypy>=1.9.0; extra == "dev"
29
30
  Requires-Dist: ruff>=0.8.0; extra == "dev"
30
31
  Requires-Dist: setuptools-scm>=8.0; extra == "dev"
31
32
  Dynamic: license-file
@@ -25,6 +25,7 @@ git2svn/core.py
25
25
  git2svn/eol.py
26
26
  git2svn/git.py
27
27
  git2svn/patcher.py
28
+ git2svn/py.typed
28
29
  git2svn/state.py
29
30
  git2svn/svn.py
30
31
  git2svn.egg-info/PKG-INFO
@@ -1,5 +1,6 @@
1
1
 
2
2
  [dev]
3
3
  coverage>=7.0.0
4
+ mypy>=1.9.0
4
5
  ruff>=0.8.0
5
6
  setuptools-scm>=8.0
@@ -25,6 +25,7 @@
25
25
  "git2svn/eol.py",
26
26
  "git2svn/git.py",
27
27
  "git2svn/patcher.py",
28
+ "git2svn/py.typed",
28
29
  "git2svn/state.py",
29
30
  "git2svn/svn.py",
30
31
  "pyproject.toml",
@@ -37,6 +37,7 @@ Changelog = "https://github.com/simon123h/git2svn/releases"
37
37
  [project.optional-dependencies]
38
38
  dev = [
39
39
  "coverage>=7.0.0",
40
+ "mypy>=1.9.0",
40
41
  "ruff>=0.8.0",
41
42
  "setuptools-scm>=8.0",
42
43
  ]
@@ -85,3 +86,20 @@ exclude_lines = [
85
86
  "if __name__ == .__main__.:",
86
87
  ]
87
88
 
89
+ [tool.setuptools.package-data]
90
+ git2svn = ["py.typed"]
91
+
92
+ [tool.mypy]
93
+ python_version = "3.11"
94
+ strict = true
95
+ warn_unused_configs = true
96
+ disallow_untyped_defs = true
97
+ disallow_incomplete_defs = true
98
+ check_untyped_defs = true
99
+ no_implicit_optional = true
100
+ warn_redundant_casts = true
101
+ warn_unused_ignores = true
102
+ warn_return_any = true
103
+ show_error_codes = true
104
+
105
+
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes