-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adiciona kwargs ao Client() permitindo sobreescrever a variavel de ambiente com named_keys #19
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aprovei do celular. Agora que vi que os testes estão falhando na CI. Isso acontece pois o Python tenta primeiro resolver o valor padrão no kwargs.gey
. Temos que mudar a implementação para evitar isso!
@cuducos #help! |
Uma alternativa seria: email = kwargs.get(‘xpto’)
if email is None:
email = config(`XPTO`) |
Vou testar. Estava entendendo que, primeiro ele tenta resolver o |
Quando vc chama |
Foi o que eu entendi. |
primeiro usa kwargs para, caso seja nulo, buscar nas variáveis de ambiente
@cuducos, fiz a alteração sugerida, mantendo o tratamento do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agora sim 🎉
Adiciona a possibilidade de passar as credenciais
email
epassword
, para autentiação doClient
, a partir de named_keys, sobreescrevendo as credenciais definidas por variáveis de ambiente.