github2gerrit 1.4.3__tar.gz → 1.4.4__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.
- github2gerrit-1.4.4/.aislop/config.yml +28 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/.pre-commit-config.yaml +25 -5
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/PKG-INFO +1 -1
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/action.yaml +2 -2
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/sitecustomize.py +7 -6
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/cli.py +1650 -1324
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/commit_normalization.py +33 -24
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/config.py +143 -114
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/core.py +2480 -1759
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/duplicate_detection.py +450 -320
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/external_api.py +197 -120
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/gerrit_pr_closer.py +764 -481
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/gerrit_ssh.py +2 -2
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/gerrit_urls.py +107 -91
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/orchestrator/reconciliation.py +125 -62
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/reconcile_matcher.py +75 -40
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/ssh_agent_setup.py +78 -65
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/ssh_discovery.py +202 -138
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_config_helpers.py +22 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_gerrit_pr_closer.py +56 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_gerrit_urls_more.py +26 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_ssh_discovery.py +21 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/uv.lock +67 -67
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/.editorconfig +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/.gitignore +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/.gitlint +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/.markdownlint.yaml +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/.yamllint +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/LICENSE +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/LICENSES/Apache-2.0.txt +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/README.md +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/REUSE.toml +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/SECURITY.md +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/docs/COMMIT_RULES.md +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/docs/cli.md +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/docs/development.md +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/docs/features.md +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/docs/github2gerrit_token_permissions_classic.png +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/pyproject.toml +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/__init__.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/commit_rules.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/constants.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/error_codes.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/gerrit_query.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/gerrit_rest.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/github_api.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/gitreview.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/gitutils.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/mapping_comment.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/models.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/netrc.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/orchestrator/__init__.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/pr_commands.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/pr_content_filter.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/rich_display.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/rich_logging.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/similarity.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/ssh_common.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/ssh_config_parser.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/trailers.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/src/github2gerrit/utils.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/conftest.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/fixtures/__init__.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/fixtures/make_repo.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/fixtures/ssh_config_samples.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_action_environment_mapping.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_action_outputs.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_action_pr_number_handling.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_action_step_validation.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_automation_only.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_change_id_deduplication.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_clean_squash_title.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_cli.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_cli_helpers.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_cli_netrc_options.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_cli_outputs_file.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_cli_url_and_dryrun.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_commit_normalization.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_commit_rules.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_composite_action_coverage.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_config_and_reviewers.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_core_close_pr_policy.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_core_config_and_errors.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_core_gerrit_backref_comment.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_core_gerrit_push_errors.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_core_gerrit_rest_results.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_core_integration_fixture_repo.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_core_prepare_commits.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_core_shallow_clone.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_core_ssh_setup.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_core_ssrf_protection.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_dependency_supersession.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_dns_validation_and_no_gerrit.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_duplicate_detection.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_email_case_normalization.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_error_codes.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_external_api_framework.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_final_state_reconciliation.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_force_flag_cli.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_gerrit_change_id_footer.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_gerrit_change_status_checks.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_gerrit_rest_client.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_gerrit_ssh_abandon.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_gerrit_urls.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_ghe_and_gitreview_args.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_github_api_error_handling.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_github_api_helpers.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_github_api_retry_and_helpers.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_gitreview.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_gitutils_helpers.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_issue_157_regressions.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_mapping_comment_additional.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_mapping_comment_digest_and_backref.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_metadata_and_reconciliation.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_metadata_trailer_separation_bug.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_misc_small_coverage.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_netrc.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_orphan_rest_side_effects.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_pr_commands.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_pr_content_filter.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_pr_content_filter_integration.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_pr_update_detection.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_reconciliation_extracted_module.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_reconciliation_plan_and_orphans.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_reconciliation_scenarios.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_ssh_agent.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_ssh_agent_ownership.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_ssh_artifact_prevention.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_ssh_common.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_ssh_discovery_dry_run.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_trailers_additional.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_url_parser.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/test_utils.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/unit/test_config_integration.py +0 -0
- {github2gerrit-1.4.3 → github2gerrit-1.4.4}/tests/unit/test_ssh_config_parser.py +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: 2026 The Linux Foundation
|
|
3
|
+
|
|
4
|
+
# aislop quality gate configuration.
|
|
5
|
+
#
|
|
6
|
+
# The pre-commit hook and CI both run `aislop ci` against this config.
|
|
7
|
+
# Overly long functions and deeply nested code are refactored in the
|
|
8
|
+
# source tree into focused helpers rather than suppressed.
|
|
9
|
+
#
|
|
10
|
+
# maxFileLoc is raised from the 400 default to 900: this codebase is
|
|
11
|
+
# organised into cohesive single-responsibility modules (SSH discovery
|
|
12
|
+
# and setup, gerrit REST/query, reconciliation, config, etc.) that
|
|
13
|
+
# naturally sit in the 450-900 line range. 900 still flags egregiously
|
|
14
|
+
# oversized modules.
|
|
15
|
+
#
|
|
16
|
+
# Three orchestration god-files remain above this threshold: core.py,
|
|
17
|
+
# cli.py and gerrit_pr_closer.py. Their overly long functions and deep
|
|
18
|
+
# nesting are decomposed here, but a full module/class split is a large,
|
|
19
|
+
# self-contained refactor tracked as dedicated follow-up work; each
|
|
20
|
+
# carries an in-file `aislop-ignore-file complexity/file-too-large` with
|
|
21
|
+
# that rationale so the gate stays green in the meantime.
|
|
22
|
+
version: 1
|
|
23
|
+
|
|
24
|
+
quality:
|
|
25
|
+
maxFileLoc: 900
|
|
26
|
+
|
|
27
|
+
ci:
|
|
28
|
+
failBelow: 100
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
# SPDX-FileCopyrightText: 2025 The Linux Foundation
|
|
4
4
|
|
|
5
5
|
ci:
|
|
6
|
-
|
|
6
|
+
# pre-commit.ci sandbox prevents network calls; aislop runs engines
|
|
7
|
+
# that can call the network at scan time, so it cannot run there
|
|
8
|
+
# either. gha-workflow-linter validates action calls over the
|
|
9
|
+
# network; pytest runs the full suite.
|
|
10
|
+
skip: [pytest, gha-workflow-linter, aislop]
|
|
7
11
|
autofix_commit_msg: |
|
|
8
12
|
Chore: pre-commit autofixes
|
|
9
13
|
|
|
@@ -59,7 +63,7 @@ repos:
|
|
|
59
63
|
types: [yaml]
|
|
60
64
|
|
|
61
65
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
62
|
-
rev:
|
|
66
|
+
rev: 2700fd5671c633760d912769c041bfcde2b9a01b # frozen: v0.15.22
|
|
63
67
|
hooks:
|
|
64
68
|
- id: ruff
|
|
65
69
|
files: ^(src|scripts|tests)/.+\.py$
|
|
@@ -89,7 +93,7 @@ repos:
|
|
|
89
93
|
- id: shellcheck
|
|
90
94
|
|
|
91
95
|
- repo: https://github.com/igorshubovych/markdownlint-cli
|
|
92
|
-
rev:
|
|
96
|
+
rev: 5b5dddc4fb0f83c3ea1fc5616fa63e115dce83e0 # frozen: v0.49.1
|
|
93
97
|
hooks:
|
|
94
98
|
- id: markdownlint
|
|
95
99
|
args: ["--fix", "--config", ".markdownlint.yaml"]
|
|
@@ -109,7 +113,7 @@ repos:
|
|
|
109
113
|
|
|
110
114
|
# Check for misspellings in documentation files
|
|
111
115
|
- repo: https://github.com/codespell-project/codespell
|
|
112
|
-
rev:
|
|
116
|
+
rev: 57b21406f092110c18776e39b0bda50d37c945c8 # frozen: v2.4.3
|
|
113
117
|
hooks:
|
|
114
118
|
- id: codespell
|
|
115
119
|
|
|
@@ -121,10 +125,26 @@ repos:
|
|
|
121
125
|
files: ^src/.+\.py$
|
|
122
126
|
|
|
123
127
|
- repo: https://github.com/lfreleng-actions/gha-workflow-linter
|
|
124
|
-
rev:
|
|
128
|
+
rev: cec679e88cd818179079f52925ba80b9e6cb705c # frozen: v1.2.3
|
|
125
129
|
hooks:
|
|
126
130
|
- id: gha-workflow-linter
|
|
127
131
|
|
|
132
|
+
# Catch AI slop developer-side before it reaches a pull request.
|
|
133
|
+
# Runs the full-repository quality gate, scored against
|
|
134
|
+
# .aislop/config.yml. A local hook installing the published npm
|
|
135
|
+
# package: the scanaislop/aislop git repository does not ship the
|
|
136
|
+
# built dist/, so its bundled pre-commit hook cannot install. Bump
|
|
137
|
+
# the pinned version here manually when new aislop releases ship.
|
|
138
|
+
- repo: local
|
|
139
|
+
hooks:
|
|
140
|
+
- id: aislop
|
|
141
|
+
name: aislop
|
|
142
|
+
entry: aislop ci --human
|
|
143
|
+
language: node
|
|
144
|
+
additional_dependencies: ["aislop@0.13.1"]
|
|
145
|
+
pass_filenames: false
|
|
146
|
+
always_run: true
|
|
147
|
+
|
|
128
148
|
- repo: https://github.com/python-jsonschema/check-jsonschema
|
|
129
149
|
rev: 1a4bb160cab6417b3045e1b37b6b72449243e658 # frozen: 0.37.4
|
|
130
150
|
hooks:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: github2gerrit
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.4
|
|
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
|
|
@@ -217,7 +217,7 @@ runs:
|
|
|
217
217
|
# yamllint disable-line rule:line-length
|
|
218
218
|
if: steps.disabled-check.outputs.disabled != 'true' && inputs.SKIP_CHECKOUT != 'true'
|
|
219
219
|
# yamllint disable-line rule:line-length
|
|
220
|
-
uses: actions/checkout@
|
|
220
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
221
221
|
with:
|
|
222
222
|
fetch-depth: ${{ inputs.FETCH_DEPTH }}
|
|
223
223
|
# Ensure we are on the PR's head SHA when triggered by PR events
|
|
@@ -230,7 +230,7 @@ runs:
|
|
|
230
230
|
- name: "Setup Python"
|
|
231
231
|
if: steps.disabled-check.outputs.disabled != 'true'
|
|
232
232
|
# yamllint disable-line rule:line-length
|
|
233
|
-
uses: actions/setup-python@
|
|
233
|
+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
234
234
|
with:
|
|
235
235
|
python-version-file: '${{ github.action_path }}/pyproject.toml'
|
|
236
236
|
|
|
@@ -55,6 +55,7 @@ def _debug_enabled() -> bool:
|
|
|
55
55
|
def _dbg(msg: str) -> None:
|
|
56
56
|
if _debug_enabled():
|
|
57
57
|
try:
|
|
58
|
+
# aislop-ignore-next-line python-print-debug -- gated debug logger
|
|
58
59
|
print(f"[sitecustomize] {msg}", file=sys.stderr)
|
|
59
60
|
except Exception:
|
|
60
61
|
# Debug logging must never disrupt interpreter startup; if
|
|
@@ -90,17 +91,17 @@ def _clean_stale_coverage_files(
|
|
|
90
91
|
for base in bases:
|
|
91
92
|
try:
|
|
92
93
|
base = base.resolve()
|
|
93
|
-
except Exception:
|
|
94
|
+
except Exception as exc:
|
|
94
95
|
# Use as-is if resolution fails
|
|
95
|
-
|
|
96
|
+
_dbg(f"Failed to resolve base {base}: {exc}")
|
|
96
97
|
for candidate in _iter_cov_candidates(base):
|
|
97
98
|
try:
|
|
98
99
|
# Skip the protected target if present in candidates
|
|
99
100
|
if protected and str(candidate.resolve()) == protected:
|
|
100
101
|
continue
|
|
101
|
-
except Exception:
|
|
102
|
+
except Exception as exc:
|
|
102
103
|
# If resolve fails, fall through and try to remove
|
|
103
|
-
|
|
104
|
+
_dbg(f"Failed to resolve candidate {candidate}: {exc}")
|
|
104
105
|
_remove_path(candidate)
|
|
105
106
|
|
|
106
107
|
|
|
@@ -110,9 +111,9 @@ def _ensure_unique_coverage_file() -> Path:
|
|
|
110
111
|
if existing:
|
|
111
112
|
try:
|
|
112
113
|
return Path(existing)
|
|
113
|
-
except Exception:
|
|
114
|
+
except Exception as exc:
|
|
114
115
|
# Fall through to create a sane default
|
|
115
|
-
|
|
116
|
+
_dbg(f"Invalid COVERAGE_FILE {existing!r}: {exc}")
|
|
116
117
|
unique = (
|
|
117
118
|
Path(tempfile.gettempdir())
|
|
118
119
|
/ f".coverage.pytest.{os.getpid()}.{uuid.uuid4().hex}"
|