Skip to content

docs(skill): suggest NamedTuple/dataclass for simple field-bundle classes - #15224

Merged
cclauss merged 1 commit into
TheAlgorithms:masterfrom
priya-sundaram-dev:skill-namedtuple-dataclass-hint
Sep 8, 2026
Merged

docs(skill): suggest NamedTuple/dataclass for simple field-bundle classes#15224
cclauss merged 1 commit into
TheAlgorithms:masterfrom
priya-sundaram-dev:skill-namedtuple-dataclass-hint

Conversation

@priya-sundaram-dev

Copy link
Copy Markdown
Contributor

As discussed on #15081.

Describe your change:

Adds a small, optional guideline to both agent skill files:

  • new-pull-request/SKILL.md (coder): a checklist item to consider from typing import NamedTuple or from dataclasses import dataclass for a simple class that is mostly a bundle of fields, instead of a hand-written __init__/__repr__/__eq__.
  • code-review/SKILL.md (reviewer): an optional reviewer hint to suggest those tools where they would simplify the code — explicitly not a blocker / not grounds to request changes on their own.

These are underutilized tools that make simple classes shorter and clearer, and this nudges contributors (human or AI) toward them where they make sense.

  • Fix a bug or typo in an existing file.
  • Documentation change.

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • This PR only changes one algorithm file (docs-only).

…sses

Per maintainer request on TheAlgorithms#15081: the new-pull-request skill now reminds the
coder to consider `typing.NamedTuple` / `dataclasses.dataclass` for simple
classes, and the code-review skill adds an OPTIONAL reviewer hint to suggest
them where they simplify the code (never a blocker).
@algorithms-keeper algorithms-keeper Bot added awaiting reviews This PR is ready to be reviewed documentation This PR modified documentation files labels Sep 8, 2026
@algorithms-keeper algorithms-keeper Bot removed the awaiting reviews This PR is ready to be reviewed label Sep 8, 2026
@cclauss
cclauss merged commit 247cb93 into TheAlgorithms:master Sep 8, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation This PR modified documentation files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants