Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Give YAML plugin objects a useful `__str__`

Abierto
#33 0 comentarios 0 reacciones 1 asignado Ver en GitHub

@coleman-m ya está trabajando en esto.

Desde el 18/9/2026.

  • #34 de @coleman-m — abierto

Evaluación

Este issue todavía no se ha evaluado.

Descripción

Requested Update

Description
  • Printing a YAML plugin doesn't tell you much at a glance, since it falls back to the full __repr__ dump of the plugin's contents. Add a __str__ to BaseYamlPlugin that gives a short readable summary for the cases where you just want to know which plugin you're looking at.
Background and Motivation
  • This is the pluginify side of NRLMMD-GEOIPS/geoips#424, which covers the class-based plugins whose base class lives over in geoips. Both sides are using the same wording so the two kinds of plugin read the same way.
  • __repr__ stays exactly as it is. The full dump is useful when you actually want to see everything in a plugin, and this is only about having a shorter option alongside it.
  • Leaving family out of the output on purpose, since it's on its way to being deprecated.
Alternative Solutions
  • Only fixing the class-based side in geoips and leaving this one alone. Workable, but then
    the two kinds of plugin behave differently for no good reason.
Environment
Code to demonstrate issue

What you get now:

>>> print(products.get_plugin(("abi", "Infrared")))
ProductsPlugin({'interface': 'products', 'name': 'Infrared', 'spec': {...}, ...})

What we want, with repr still available for the full picture:

>>> print(products.get_plugin(("abi", "Infrared")))
Infrared (products plugin from geoips)
Checklist for Completion
  • Add __str__ to BaseYamlPlugin
  • Leave __repr__ alone
  • Make sure it degrades gracefully when a plugin is missing attributes, so it never
    blows up on a half-built plugin in a debugger
  • Keep the wording matching what geoips#424 produces
  • Add tests
  • Add a release note
Lenguaje dominante
Python
Estrellas
1
Forks
1
Merge medio
11 d 23 h
PR fusionados (30 d)
2

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de NRLMMD-GEOIPS/pluginify

Todos los issues de NRLMMD-GEOIPS/pluginify

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.