Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
EnricoMi committed Mar 17, 2023
1 parent 1f704fe commit 57e8977
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion github/GithubIntegration.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ def create_jwt(self, expiration=None):
"""
if expiration is not None:
assert isinstance(expiration, int), expiration
assert Consts.MIN_JWT_EXPIRY <= expiration <= Consts.MAX_JWT_EXPIRY, expiration
assert (
Consts.MIN_JWT_EXPIRY <= expiration <= Consts.MAX_JWT_EXPIRY
), expiration

now = int(time.time())
payload = {
Expand Down
5 changes: 4 additions & 1 deletion tests/GithubIntegration.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ def testCreateJWTWithExpiration(self):
self.origin_time = sys.modules["time"].time
sys.modules["time"].time = lambda: 1550055331.7435968
github_integration = github.GithubIntegration(
integration_id=APP_ID, private_key=PRIVATE_KEY, jwt_expiry=120, jwt_issued_at=-30
integration_id=APP_ID,
private_key=PRIVATE_KEY,
jwt_expiry=120,
jwt_issued_at=-30,
)
token = github_integration.create_jwt(60)
payload = jwt.decode(
Expand Down

0 comments on commit 57e8977

Please sign in to comment.