Fix copy-paste scaladoc variable names in NonEmptyVector, NonEmptySeq, NonEmptyChain#4824
Merged
satorg merged 1 commit intotypelevel:mainfrom Feb 21, 2026
Conversation
…, NonEmptyChain Scaladoc examples in groupByNem and grouped were copied from NonEmptyList and still used as the variable name inside NonEmptyVector, NonEmptySeq and NonEmptyChain. Renamed to the conventionally expected identifiers: - NonEmptyVector: nel -> nev - NonEmptySeq: nel -> neSeq - NonEmptyChain: nel -> nec No functional change.
There was a problem hiding this comment.
Pull request overview
Updates Scaladoc REPL examples in Cats’ non-empty collection types to use variable names that match the type being demonstrated (avoiding leftover nel from NonEmptyList copy/paste).
Changes:
- Rename Scaladoc example variable from
neltonevinNonEmptyVectordocs forgroupByNemandgrouped. - Rename Scaladoc example variable from
neltoneSeqinNonEmptySeqdocs forgroupByNemandgrouped. - Rename Scaladoc example variable from
neltonecinNonEmptyChaindocs forgrouped.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| core/src/main/scala/cats/data/NonEmptyVector.scala | Fixes Scaladoc example variable names to align with NonEmptyVector (nev). |
| core/src/main/scala/cats/data/NonEmptySeq.scala | Fixes Scaladoc example variable names to align with NonEmptySeq (neSeq). |
| core/src/main/scala/cats/data/NonEmptyChain.scala | Fixes Scaladoc example variable names to align with NonEmptyChain (nec). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Scaladoc examples in
groupByNemandgroupedinsideNonEmptyVector,NonEmptySeq, andNonEmptyChainwere copied fromNonEmptyListand never had their variable names updated. All three usednel(short for NonEmptyList) instead of a name matching the actual type.Changes
Renamed the scaladoc example variable in each affected file:
NonEmptyVector.scalaval nel = NonEmptyVector.of(...)val nev = NonEmptyVector.of(...)NonEmptySeq.scalaval nel = NonEmptySeq.of(...)val neSeq = NonEmptySeq.of(...)NonEmptyChain.scalaval nel = NonEmptyChain.of(...)val nec = NonEmptyChain.of(...)