You've already forked httpie-cli
mirror of
https://github.com/httpie/cli.git
synced 2025-08-10 22:42:05 +02:00
Modernize the code base with f-strings (#1068)
This commit is contained in:
committed by
GitHub
parent
39314887c4
commit
0ff0874fa3
@@ -29,9 +29,9 @@ class HTTPBasicAuth(requests.auth.HTTPBasicAuth):
|
||||
|
||||
@staticmethod
|
||||
def make_header(username: str, password: str) -> str:
|
||||
credentials = u'%s:%s' % (username, password)
|
||||
token = b64encode(credentials.encode('utf8')).strip().decode('latin1')
|
||||
return 'Basic %s' % token
|
||||
credentials = f'{username}:{password}'
|
||||
token = b64encode(credentials.encode('utf-8')).strip().decode('latin1')
|
||||
return f'Basic {token}'
|
||||
|
||||
|
||||
class BasicAuthPlugin(BuiltinAuthPlugin):
|
||||
|
Reference in New Issue
Block a user