Skip to content

chore: restore one-value-per-line layout of long enum defaults - #2781

Merged
krlmlr merged 1 commit into
mainfrom
claude/fix-enum-default-formatting
Jul 26, 2026
Merged

chore: restore one-value-per-line layout of long enum defaults#2781
krlmlr merged 1 commit into
mainfrom
claude/fix-enum-default-formatting

Conversation

@krlmlr

@krlmlr krlmlr commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Follow-up to the transitivity() formatting review on the merged #2759.

The defect

The ellipsis-migration rewriter normalized each formal onto one line and
collapsed multi-line enum defaults, producing a 155-character line with stray
inner spaces:

type = c( "undirected", "global", "globalundirected", "localundirected", "local", "average", "localaverage", "localaverageundirected", "barrat", "weighted" ),

air did not repair it because c is on air.toml's skip list
(intentionally, so data vectors keep their authored layout) — which is also
why this must be fixed by hand rather than by the formatter.

The fix

Restore the pre-migration one-value-per-line layout for the two affected
functions on maintransitivity() (type) and distances()
(algorithm) — in both the function signatures
(R/structural-properties.R) and the migration registry
(tools/migrations/structural-properties.R).

No behavior change:

  • the generated ARG_HANDLE blocks are deparse-based and stay byte-identical
    (Rscript tools/generate-migrations.R is a no-op on this branch);
  • man/*.Rd usage is deparse-based too — devtools::document() produces no
    diff;
  • transitivity()/distances() behavior verified unchanged.

The same collapse exists on three not-yet-merged topic branches
(games ×2, conversion ×1, similarity-efficiency ×2 functions);
those branches are being amended directly with the identical layout fix.


Generated by Claude Code

The ellipsis-migration rewriter collapsed multi-line enum defaults
into single over-long lines with stray inner spaces,
e.g. `type = c( "undirected", ... )` in `transitivity()`,
and air leaves them alone because `c` is on its skip list.
Restore the original one-value-per-line layout
for `transitivity()` and `distances()`,
in both the signatures and the migration registry.
No behavior change; the generated ARG_HANDLE blocks and Rd usage
are deparse-based and stay identical.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
krlmlr pushed a commit that referenced this pull request Jul 26, 2026
Same fix as #2781: the migration rewriter collapsed multi-line enum
defaults and air skips c() calls, so restore the original layout.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
krlmlr pushed a commit that referenced this pull request Jul 26, 2026
Same fix as #2781: the migration rewriter collapsed multi-line enum
defaults and air skips c() calls, so restore the original layout.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
krlmlr pushed a commit that referenced this pull request Jul 26, 2026
Same fix as #2781: the migration rewriter collapsed multi-line enum
defaults and air skips c() calls, so restore the original layout.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
@krlmlr
krlmlr enabled auto-merge (squash) July 26, 2026 19:24
@krlmlr
krlmlr merged commit a0c3400 into main Jul 26, 2026
7 of 8 checks passed
@krlmlr
krlmlr deleted the claude/fix-enum-default-formatting branch July 26, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants