github2gerrit 1.3.0__tar.gz → 1.3.1__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 (134) hide show
  1. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/PKG-INFO +1 -1
  2. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/cli.py +7 -4
  3. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/gerrit_rest.py +0 -1
  4. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/ssh_config_parser.py +3 -2
  5. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_config_helpers.py +6 -1
  6. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_core_config_and_errors.py +5 -1
  7. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_core_ssh_setup.py +8 -2
  8. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_url_parser.py +5 -1
  9. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/.editorconfig +0 -0
  10. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/.gitignore +0 -0
  11. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/.gitlint +0 -0
  12. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/.markdownlint.yaml +0 -0
  13. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/.pre-commit-config.yaml +0 -0
  14. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/.readthedocs.yml +0 -0
  15. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/.yamllint +0 -0
  16. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/LICENSE +0 -0
  17. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/LICENSES/Apache-2.0.txt +0 -0
  18. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/README.md +0 -0
  19. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/REUSE.toml +0 -0
  20. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/SECURITY.md +0 -0
  21. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/action.yaml +0 -0
  22. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/docs/COMMIT_RULES.md +0 -0
  23. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/docs/COMPOSITE_ACTION_TESTING.md +0 -0
  24. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/docs/PR_UPDATE_IMPLEMENTATION.md +0 -0
  25. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/docs/RELEASE-v0.2.0.md +0 -0
  26. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/docs/github2gerrit_token_permissions_classic.png +0 -0
  27. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/pyproject.toml +0 -0
  28. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/sitecustomize.py +0 -0
  29. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/__init__.py +0 -0
  30. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/commit_normalization.py +0 -0
  31. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/commit_rules.py +0 -0
  32. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/config.py +0 -0
  33. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/constants.py +0 -0
  34. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/core.py +0 -0
  35. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/duplicate_detection.py +0 -0
  36. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/error_codes.py +0 -0
  37. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/external_api.py +0 -0
  38. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/gerrit_pr_closer.py +0 -0
  39. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/gerrit_query.py +0 -0
  40. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/gerrit_ssh.py +0 -0
  41. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/gerrit_urls.py +0 -0
  42. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/github_api.py +0 -0
  43. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/gitreview.py +0 -0
  44. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/gitutils.py +0 -0
  45. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/mapping_comment.py +0 -0
  46. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/models.py +0 -0
  47. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/netrc.py +0 -0
  48. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/orchestrator/__init__.py +0 -0
  49. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/orchestrator/reconciliation.py +0 -0
  50. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/pr_commands.py +0 -0
  51. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/pr_content_filter.py +0 -0
  52. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/reconcile_matcher.py +0 -0
  53. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/rich_display.py +0 -0
  54. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/rich_logging.py +0 -0
  55. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/similarity.py +0 -0
  56. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/ssh_agent_setup.py +0 -0
  57. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/ssh_common.py +0 -0
  58. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/ssh_discovery.py +0 -0
  59. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/trailers.py +0 -0
  60. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/src/github2gerrit/utils.py +0 -0
  61. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/conftest.py +0 -0
  62. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/fixtures/__init__.py +0 -0
  63. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/fixtures/make_repo.py +0 -0
  64. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/fixtures/ssh_config_samples.py +0 -0
  65. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_action_environment_mapping.py +0 -0
  66. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_action_outputs.py +0 -0
  67. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_action_pr_number_handling.py +0 -0
  68. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_action_step_validation.py +0 -0
  69. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_automation_only.py +0 -0
  70. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_change_id_deduplication.py +0 -0
  71. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_clean_squash_title.py +0 -0
  72. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_cli.py +0 -0
  73. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_cli_helpers.py +0 -0
  74. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_cli_netrc_options.py +0 -0
  75. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_cli_outputs_file.py +0 -0
  76. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_cli_url_and_dryrun.py +0 -0
  77. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_commit_normalization.py +0 -0
  78. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_commit_rules.py +0 -0
  79. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_composite_action_coverage.py +0 -0
  80. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_config_and_reviewers.py +0 -0
  81. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_core_close_pr_policy.py +0 -0
  82. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_core_gerrit_backref_comment.py +0 -0
  83. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_core_gerrit_push_errors.py +0 -0
  84. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_core_gerrit_rest_results.py +0 -0
  85. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_core_integration_fixture_repo.py +0 -0
  86. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_core_prepare_commits.py +0 -0
  87. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_core_shallow_clone.py +0 -0
  88. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_core_ssrf_protection.py +0 -0
  89. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_dependency_supersession.py +0 -0
  90. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_dns_validation_and_no_gerrit.py +0 -0
  91. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_duplicate_detection.py +0 -0
  92. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_email_case_normalization.py +0 -0
  93. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_error_codes.py +0 -0
  94. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_external_api_framework.py +0 -0
  95. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_force_flag_cli.py +0 -0
  96. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_gerrit_change_id_footer.py +0 -0
  97. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_gerrit_change_status_checks.py +0 -0
  98. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_gerrit_pr_closer.py +0 -0
  99. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_gerrit_rest_client.py +0 -0
  100. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_gerrit_ssh_abandon.py +0 -0
  101. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_gerrit_urls.py +0 -0
  102. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_gerrit_urls_more.py +0 -0
  103. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_ghe_and_gitreview_args.py +0 -0
  104. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_github_api_error_handling.py +0 -0
  105. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_github_api_helpers.py +0 -0
  106. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_github_api_retry_and_helpers.py +0 -0
  107. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_gitreview.py +0 -0
  108. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_gitutils_helpers.py +0 -0
  109. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_issue_157_regressions.py +0 -0
  110. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_mapping_comment_additional.py +0 -0
  111. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_mapping_comment_digest_and_backref.py +0 -0
  112. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_metadata_and_reconciliation.py +0 -0
  113. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_metadata_trailer_separation_bug.py +0 -0
  114. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_misc_small_coverage.py +0 -0
  115. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_netrc.py +0 -0
  116. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_orphan_rest_side_effects.py +0 -0
  117. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_pr_commands.py +0 -0
  118. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_pr_content_filter.py +0 -0
  119. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_pr_content_filter_integration.py +0 -0
  120. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_pr_update_detection.py +0 -0
  121. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_reconciliation_extracted_module.py +0 -0
  122. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_reconciliation_plan_and_orphans.py +0 -0
  123. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_reconciliation_scenarios.py +0 -0
  124. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_ssh_agent.py +0 -0
  125. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_ssh_agent_ownership.py +0 -0
  126. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_ssh_artifact_prevention.py +0 -0
  127. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_ssh_common.py +0 -0
  128. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_ssh_discovery.py +0 -0
  129. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_ssh_discovery_dry_run.py +0 -0
  130. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_trailers_additional.py +0 -0
  131. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/test_utils.py +0 -0
  132. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/unit/test_config_integration.py +0 -0
  133. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/tests/unit/test_ssh_config_parser.py +0 -0
  134. {github2gerrit-1.3.0 → github2gerrit-1.3.1}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: github2gerrit
3
- Version: 1.3.0
3
+ Version: 1.3.1
4
4
  Summary: Submit a GitHub pull request to a Gerrit repository.
5
5
  Project-URL: Homepage, https://github.com/lfreleng-actions/github2gerrit-action
6
6
  Project-URL: Repository, https://github.com/lfreleng-actions/github2gerrit-action
@@ -504,9 +504,12 @@ def _resolve_org(default_org: str | None) -> str:
504
504
  if TYPE_CHECKING:
505
505
  F = TypeVar("F", bound=Callable[..., object])
506
506
 
507
- def typed_app_command(
508
- *args: object, **kwargs: object
509
- ) -> Callable[[F], F]: ...
507
+ # Typed stub so basedpyright treats @typed_app_command as a typed
508
+ # decorator. The body raises rather than using an ellipsis so static
509
+ # analysers do not model it as a procedure that returns None; this
510
+ # branch is never executed at runtime.
511
+ def typed_app_command(*args: object, **kwargs: object) -> Callable[[F], F]:
512
+ raise NotImplementedError
510
513
  else:
511
514
  typed_app_command = app.command
512
515
 
@@ -865,7 +868,7 @@ def main(
865
868
  ) -> bool:
866
869
  """Return *current* if the CLI flag was explicit, else parse env."""
867
870
  source = ctx.get_parameter_source(param_name) # pyright: ignore[reportAttributeAccessIssue]
868
- if source == click.core.ParameterSource.COMMANDLINE: # pyright: ignore[reportAttributeAccessIssue]
871
+ if source == click.core.ParameterSource.COMMANDLINE: # pyright: ignore[reportAttributeAccessIssue, reportUnnecessaryComparison]
869
872
  return current
870
873
  env_val = os.getenv(env_var)
871
874
  if env_val is not None:
@@ -321,7 +321,6 @@ class GerritRestClient:
321
321
  )
322
322
 
323
323
  with urllib.request.urlopen(req, timeout=self._timeout) as resp:
324
- status = getattr(resp, "status", None)
325
324
  content = resp.read()
326
325
  # Gerrit prepends ")]}'" in JSON responses to prevent JSON
327
326
  # hijacking; strip if present
@@ -272,8 +272,9 @@ class SSHConfig:
272
272
  try:
273
273
  return bool(re.match(regex_pattern, hostname))
274
274
  except re.error:
275
- # If regex is invalid, fall back to exact match
276
- return pattern == hostname
275
+ # An invalid regex cannot match. The exact-match case is
276
+ # already handled above, so there is nothing left to match.
277
+ return False
277
278
 
278
279
 
279
280
  # Global cache for SSH config instances to avoid re-parsing
@@ -28,7 +28,12 @@ from github2gerrit.config import overlay_missing
28
28
  if TYPE_CHECKING:
29
29
  F = TypeVar("F", bound=Callable[..., object])
30
30
 
31
- def parametrize(*args: object, **kwargs: object) -> Callable[[F], F]: ...
31
+ # Typed stub so basedpyright treats @parametrize as a typed decorator
32
+ # (reportUntypedFunctionDecorator). The body raises rather than using
33
+ # an ellipsis so static analysers do not model it as a procedure that
34
+ # returns None; this code is never executed at runtime.
35
+ def parametrize(*args: object, **kwargs: object) -> Callable[[F], F]:
36
+ raise NotImplementedError
32
37
  else:
33
38
  from pytest import mark
34
39
 
@@ -287,7 +287,11 @@ def test_configure_git_raises_on_git_review_init_failure(
287
287
  if TYPE_CHECKING:
288
288
  F = TypeVar("F", bound=Callable[..., object])
289
289
 
290
- def fixture(*args: object, **kwargs: object) -> Callable[[F], F]: ...
290
+ # Typed stub (raising body, never executed) so basedpyright treats
291
+ # @fixture as a typed decorator and static analysers do not model it
292
+ # as a procedure returning None.
293
+ def fixture(*args: object, **kwargs: object) -> Callable[[F], F]:
294
+ raise NotImplementedError
291
295
  else:
292
296
  fixture = pytest.fixture
293
297
 
@@ -52,8 +52,14 @@ def snapshot_dir_state(directory: Path) -> dict[str, str]:
52
52
  if TYPE_CHECKING:
53
53
  F = TypeVar("F", bound=Callable[..., object])
54
54
 
55
- def fixture(*args: object, **kwargs: object) -> Callable[[F], F]: ...
56
- def parametrize(*args: object, **kwargs: object) -> Callable[[F], F]: ...
55
+ # Typed stubs (raising bodies, never executed) so basedpyright treats
56
+ # @fixture/@parametrize as typed decorators and static analysers do not
57
+ # model them as procedures returning None.
58
+ def fixture(*args: object, **kwargs: object) -> Callable[[F], F]:
59
+ raise NotImplementedError
60
+
61
+ def parametrize(*args: object, **kwargs: object) -> Callable[[F], F]:
62
+ raise NotImplementedError
57
63
  else:
58
64
  from pytest import fixture as _fixture
59
65
  from pytest import mark as _mark
@@ -11,7 +11,11 @@ from typing import TypeVar
11
11
  if TYPE_CHECKING:
12
12
  F = TypeVar("F", bound=Callable[..., object])
13
13
 
14
- def parametrize(*args: object, **kwargs: object) -> Callable[[F], F]: ...
14
+ # Typed stub (raising body, never executed) so basedpyright treats
15
+ # @parametrize as a typed decorator and static analysers do not model
16
+ # it as a procedure returning None.
17
+ def parametrize(*args: object, **kwargs: object) -> Callable[[F], F]:
18
+ raise NotImplementedError
15
19
  else:
16
20
  from pytest import mark
17
21
 
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