Give YAML plugin objects a useful `__str__`
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__toBaseYamlPluginthat 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
familyout 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__toBaseYamlPlugin - 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
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de NRLMMD-GEOIPS/pluginify
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
NRLMMD-GEOIPS/pluginify#41 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
NRLMMD-GEOIPS/pluginify#35 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
NRLMMD-GEOIPS/pluginify#30 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
NRLMMD-GEOIPS/pluginify#32 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
NRLMMD-GEOIPS/pluginify#31 ·
Todos los issues de NRLMMD-GEOIPS/pluginify
Issues similares
-
Skill submission: negative-test-first (testing discipline; PR creation is collaborator-only)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ComposioHQ/awesome-claude-skills#2398 ·
Los mantenedores suelen responder en 2 días
-
bug converter
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
grafana/sigma-rule-deployment#435 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
datamodel-code-generator/datamodel-code-generator#5589 ·
Los mantenedores suelen responder en 1 día
-
Shell: serve the home app's Cookie Policy on a hard reloadPosiblemente ocupada @2001anshkaushik la tomó hoy. Abiertofeature module:ai
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
rocketride-org/rocketride-server#2899 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
GEFSv12
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100