Skip to content

test(corekit): drop the dead conventions.rst candidate and the stale #912 tense in _sentinel_section #920

Description

@JarryShaw

_sentinel_section() in tests/corekit/test_sentinel_exports_unit.py still carries two leftovers from #912's move of conventions.rst, both surfaced by the cross-review of #919.

1. A dead first candidate. Lines 135-136 on 3766c3c09:

for candidate in ('docs/source/conventions.rst',
                  'docs/source/contributing/conventions.rst'):

docs/source/conventions.rst has not existed since #912 landed as 9806f16aa, so the first iteration's path.is_file() is always false. The loop still works — it falls through to the real path — but it is dead code that reads as though both locations were live.

2. A stale tense in the docstring. Lines 129-131 describe the move as in progress:

the move to :file:docs/source/contributing/conventions.rst that GitHub pull request #912 is making

#912 has merged. #919 corrected the :file: path on that same docstring's first line but left the tense and the dead branch beneath it.

Neither is a behaviour defect: the helper resolves the right file today, and the else: raise AssertionError fallback is correct. It is hygiene, and the reason to fix it is that a reader cannot tell the dead branch from a deliberate compatibility shim.

Blocked on #911. That issue's work has this exact file dirty in flight, editing the module docstring and the SENTINELS table. A second edit to it now would either conflict or silently revert. Unblocks when #911 merges. #919 is also still open against this file, so the clean start point is after both.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testPull requests that add or correct tests (test: subject prefix)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions