subedit 0.1.3__tar.gz → 0.1.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.
- {subedit-0.1.3 → subedit-0.1.4}/.claude-plugin/marketplace.json +2 -1
- {subedit-0.1.3 → subedit-0.1.4}/PKG-INFO +1 -1
- {subedit-0.1.3 → subedit-0.1.4/plugins/subedit}/.claude-plugin/plugin.json +1 -1
- {subedit-0.1.3 → subedit-0.1.4/plugins/subedit}/hooks/hooks.json +2 -2
- {subedit-0.1.3/hooks → subedit-0.1.4/plugins/subedit/scripts}/run-subedit-hook.sh +1 -1
- {subedit-0.1.3 → subedit-0.1.4/plugins/subedit}/skills/judging-findings/SKILL.md +1 -1
- {subedit-0.1.3 → subedit-0.1.4}/pyproject.toml +1 -1
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/__init__.py +1 -1
- subedit-0.1.4/src/subedit/vale/styles/subedit/Ellipsis.yml +9 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/test_plugin.py +16 -9
- {subedit-0.1.3 → subedit-0.1.4}/uv.lock +1 -1
- subedit-0.1.3/src/subedit/vale/styles/subedit/Ellipsis.yml +0 -9
- {subedit-0.1.3 → subedit-0.1.4}/.claude/settings.json +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/.github/dependabot.yml +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/.github/release.yml +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/.github/workflows/ci.yml +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/.github/workflows/pr.yml +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/.github/workflows/release.yml +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/.gitignore +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/.vale.ini +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/LICENSE +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/README.md +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/docs/rules.md +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/examples/README.md +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/examples/probe.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/examples/subedit.toml +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/examples/walkthrough.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/application/__init__.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/application/corpus_meter.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/application/fixer.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/application/linter.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/application/report_aggregator.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/domain/__init__.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/domain/models/__init__.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/domain/models/comment.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/domain/models/diagnostic.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/domain/models/document.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/domain/models/position.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/domain/models/prose.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/domain/models/rule_set.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/domain/models/text.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/domain/ports/__init__.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/domain/ports/external_linter.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/domain/ports/language_conventions.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/domain/ports/rule.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/domain/ports/source_parser.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/domain/rules/__init__.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/domain/rules/layout.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/domain/rules/rewrite.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/domain/rules/structure.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/infrastructure/__init__.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/infrastructure/config_sources/__init__.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/infrastructure/config_sources/config_schema.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/infrastructure/config_sources/toml_config_source.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/infrastructure/linters/__init__.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/infrastructure/linters/autocorrect_linter.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/infrastructure/linters/vale_linter.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/infrastructure/parsers/__init__.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/infrastructure/parsers/languages/__init__.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/infrastructure/parsers/languages/language_profile.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/infrastructure/parsers/languages/python_profile.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/infrastructure/parsers/tree_sitter_parser.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/presentation/__init__.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/presentation/cli.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/presentation/harnesses/__init__.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/presentation/harnesses/agent_harness.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/presentation/harnesses/claude_code_harness.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/presentation/harnesses/codex_harness.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/presentation/hook.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/presentation/report.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/presentation/rule_reference.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/vale/styles/subedit/DateRef.yml +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/vale/styles/subedit/EditHistory.yml +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/vale/styles/subedit/EmDash.yml +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/vale/styles/subedit/ExternalRef.yml +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/vale/styles/subedit/MidSentenceColon.yml +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/vale/styles/subedit/MidSentenceColonMarkup.yml +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/vale/styles/subedit/Semicolon.yml +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/vale/styles/subedit/SignatureTag.yml +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/src/subedit/vale/vale.ini +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/subedit.toml +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/fixtures/autocorrect/unspaced.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/fixtures/vale/clean.md +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/fixtures/vale/violations.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/test_cli.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/test_comment.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/test_config.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/test_corpus_meter.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/test_diagnostic.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/test_fixer.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/test_harnesses.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/test_hook.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/test_linter.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/test_parser.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/test_parser_ocp.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/test_parser_oracle.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/test_position.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/test_prose.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/test_report_aggregator.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/test_rules_layout.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/test_rules_rewrite.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/test_rules_structure.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/test_schema.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/test_self_hosting.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/test_text.py +0 -0
- {subedit-0.1.3 → subedit-0.1.4}/tests/test_vale_style.py +0 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mroops",
|
|
3
3
|
"owner": { "name": "mroops0111" },
|
|
4
|
+
"description": "Plugins built alongside subedit.",
|
|
4
5
|
"plugins": [
|
|
5
6
|
{
|
|
6
7
|
"name": "subedit",
|
|
7
|
-
"source":
|
|
8
|
+
"source": "./plugins/subedit",
|
|
8
9
|
"description": "Repairs comment layout silently on write, and returns only what needs rewriting."
|
|
9
10
|
}
|
|
10
11
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: subedit
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: A linter and formatter for the prose inside code comments, across languages.
|
|
5
5
|
Project-URL: Homepage, https://github.com/mroops0111/subedit
|
|
6
6
|
Project-URL: Repository, https://github.com/mroops0111/subedit
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"hooks": [
|
|
8
8
|
{
|
|
9
9
|
"type": "command",
|
|
10
|
-
"command": "${CLAUDE_PLUGIN_ROOT}/
|
|
10
|
+
"command": "\"${CLAUDE_PLUGIN_ROOT}\"/scripts/run-subedit-hook.sh",
|
|
11
11
|
"timeout": 30
|
|
12
12
|
}
|
|
13
13
|
]
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"hooks": [
|
|
19
19
|
{
|
|
20
20
|
"type": "command",
|
|
21
|
-
"command": "${CLAUDE_PLUGIN_ROOT}/
|
|
21
|
+
"command": "\"${CLAUDE_PLUGIN_ROOT}\"/scripts/run-subedit-hook.sh prepare",
|
|
22
22
|
"timeout": 10
|
|
23
23
|
}
|
|
24
24
|
]
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# because the first run installs subedit and downloads Vale, which no edit should wait on.
|
|
5
5
|
set -uo pipefail
|
|
6
6
|
|
|
7
|
-
SPEC='subedit[vale]>=0.1.
|
|
7
|
+
SPEC='subedit[vale]>=0.1.4'
|
|
8
8
|
# A bare uvx takes the first Python it finds, which on a stock Mac is too old for subedit.
|
|
9
9
|
PYTHON='>=3.11'
|
|
10
10
|
|
|
@@ -41,4 +41,4 @@ An error always needs a rewrite. The message states the fix, and these notes cov
|
|
|
41
41
|
- `signature-restating-tag` and `subedit.SignatureTag`: delete the tag, since the signature already says it.
|
|
42
42
|
- `subedit.EditHistory`: state the current behavior, not its history.
|
|
43
43
|
- `subedit.Semicolon`, `subedit.EmDash`: split into two sentences, or use a comma or parentheses.
|
|
44
|
-
- `subedit.Ellipsis`:
|
|
44
|
+
- `subedit.Ellipsis`: name two or three concrete examples after "such as", as in "a transport failure, such as a connect, timeout, or DNS error". Dropping the trailing word and joining the rest with "or" turns a sample into the whole set, which narrows what the sentence claims.
|
|
@@ -9,10 +9,12 @@ from subedit.presentation.harnesses.claude_code_harness import EDIT_TOOLS
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
ROOT = pathlib.Path(__file__).resolve().parents[1]
|
|
12
|
-
|
|
12
|
+
PLUGIN = ROOT / 'plugins' / 'subedit'
|
|
13
|
+
MANIFEST = PLUGIN / '.claude-plugin' / 'plugin.json'
|
|
13
14
|
MARKETPLACE = ROOT / '.claude-plugin' / 'marketplace.json'
|
|
14
|
-
HOOKS =
|
|
15
|
-
WRAPPER =
|
|
15
|
+
HOOKS = PLUGIN / 'hooks' / 'hooks.json'
|
|
16
|
+
WRAPPER = PLUGIN / 'scripts' / 'run-subedit-hook.sh'
|
|
17
|
+
WRAPPER_COMMAND = f'"${{CLAUDE_PLUGIN_ROOT}}"/scripts/{WRAPPER.name}'
|
|
16
18
|
|
|
17
19
|
|
|
18
20
|
def load(path: pathlib.Path) -> typing.Any:
|
|
@@ -45,8 +47,7 @@ def test_the_hook_matcher_covers_every_tool_the_harness_recognises() -> None:
|
|
|
45
47
|
def test_the_hook_runs_the_wrapper_from_the_plugin_directory() -> None:
|
|
46
48
|
command = load(HOOKS)['hooks']['PostToolUse'][0]['hooks'][0]['command']
|
|
47
49
|
|
|
48
|
-
assert
|
|
49
|
-
assert command.endswith(WRAPPER.name)
|
|
50
|
+
assert command == WRAPPER_COMMAND, 'a bare or unquoted path breaks once the plugin is installed elsewhere'
|
|
50
51
|
|
|
51
52
|
|
|
52
53
|
def test_the_wrapper_is_executable() -> None:
|
|
@@ -83,18 +84,24 @@ def test_the_wrapper_runs_the_released_version() -> None:
|
|
|
83
84
|
def test_a_session_start_warms_the_same_wrapper() -> None:
|
|
84
85
|
command = load(HOOKS)['hooks']['SessionStart'][0]['hooks'][0]['command']
|
|
85
86
|
|
|
86
|
-
assert command == f'
|
|
87
|
+
assert command == f'{WRAPPER_COMMAND} prepare'
|
|
87
88
|
|
|
88
89
|
|
|
89
|
-
def
|
|
90
|
+
def test_the_marketplace_points_at_the_plugin_directory() -> None:
|
|
90
91
|
listed = load(MARKETPLACE)['plugins']
|
|
91
92
|
|
|
92
93
|
assert [plugin['name'] for plugin in listed] == ['subedit']
|
|
93
|
-
assert listed[0]['source']
|
|
94
|
+
assert (ROOT / listed[0]['source']).resolve() == PLUGIN, 'a relative source resolves from the marketplace root'
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def test_the_plugin_carries_everything_it_runs() -> None:
|
|
98
|
+
"""An install copies only the plugin directory, so nothing it loads may live outside it."""
|
|
99
|
+
assert {path.name for path in PLUGIN.iterdir()} == {'.claude-plugin', 'hooks', 'scripts', 'skills'}
|
|
100
|
+
assert [path.name for path in (PLUGIN / '.claude-plugin').iterdir()] == ['plugin.json']
|
|
94
101
|
|
|
95
102
|
|
|
96
103
|
def test_the_judging_skill_names_itself_as_its_folder_does() -> None:
|
|
97
|
-
skill =
|
|
104
|
+
skill = PLUGIN / 'skills' / 'judging-findings' / 'SKILL.md'
|
|
98
105
|
front_matter = skill.read_text(encoding='utf-8').split('---')[1]
|
|
99
106
|
|
|
100
107
|
assert 'name: judging-findings' in front_matter, 'Claude Code loads a skill by the name in its front matter'
|
|
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
|
|
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
|
|
File without changes
|
{subedit-0.1.3 → subedit-0.1.4}/src/subedit/infrastructure/config_sources/toml_config_source.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{subedit-0.1.3 → subedit-0.1.4}/src/subedit/infrastructure/parsers/languages/language_profile.py
RENAMED
|
File without changes
|
{subedit-0.1.3 → subedit-0.1.4}/src/subedit/infrastructure/parsers/languages/python_profile.py
RENAMED
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|