Skip to content

Commit

Permalink
Fix linter error
Browse files Browse the repository at this point in the history
  • Loading branch information
bim-msft committed Jan 22, 2020
1 parent 788ca69 commit cf25aeb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/azure-cli/azure/cli/command_modules/keyvault/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,15 +751,15 @@ def _jwk_to_dict(jwk):
return d


def _extract_rsa_public_key_from_jwk(jwk_dict):
def _extract_rsa_public_key_from_jwk(jwk_dict): # pylint: disable=line-too-long
# Please refer to: https://github.com/mpdavis/python-jose/blob/eed086d7650ccbd4ea8b555157aff3b1b99f14b9/jose/backends/cryptography_backend.py#L249-L254
e = jwk_dict.get('e', 256)
n = jwk_dict.get('n')
public = rsa.RSAPublicNumbers(e, n)
return public.public_key(default_backend())


def _extract_ec_public_key_from_jwk(jwk_dict):
def _extract_ec_public_key_from_jwk(jwk_dict): # pylint: disable=line-too-long
# Please refer to: https://github.com/mpdavis/python-jose/blob/eed086d7650ccbd4ea8b555157aff3b1b99f14b9/jose/backends/cryptography_backend.py#L81-L100
if not all(k in jwk_dict for k in ['x', 'y', 'crv']):
raise CLIError('Invalid EC key: missing properties(x, y, crv)')
Expand Down Expand Up @@ -802,7 +802,7 @@ def _to_der(k):
format=PublicFormat.SubjectPublicKeyInfo
)

def _to_pem(k):
def _to_pem(k): # pylint: disable=line-too-long
# Please refer to: https://github.com/mpdavis/python-jose/blob/eed086d7650ccbd4ea8b555157aff3b1b99f14b9/jose/backends/cryptography_backend.py#L329-L332
return k.public_bytes(
encoding=Encoding.PEM,
Expand Down

0 comments on commit cf25aeb

Please sign in to comment.