Is it possible to extend the Context class's run method with my own?

Aperta
#905 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python
Ambito
cli, tooling

Direzione di ricerca

Start by reading the Context class and its run method, then review how command execution parameters are defined and passed. Determine whether supporting custom parameters is an intended API change or requires a documented extension mechanism; done should include a clear supported approach and coverage for the requested custom-argument behavior.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

This might be more a general python question, but any tips would be great!

I want to add my own custom parameters to the context class's run method. I guess I could patch it, but wondering if there is a better supported way?

I want to be able to do this:
ctx.run("mycommand", hide=False, myCustomArg="somevalue")

So I can add my own functionality.

Is it possible to extend the Context class with my own and use my own class?

Lingua principale
Python
Stelle
4.8k
Fork
412
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pyinvoke/invoke

Tutte le issue di pyinvoke/invoke

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.