mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-17 04:18:07 +00:00
address formatting from black 21.4b0 (#831)
This commit is contained in:
@ -95,7 +95,7 @@ def process_state_update(obj: HasState) -> None:
|
||||
|
||||
|
||||
def process_state_updates(obj: HasState, max_updates: int = 5) -> None:
|
||||
""" process through the state machine for an object """
|
||||
"""process through the state machine for an object"""
|
||||
|
||||
for _ in range(max_updates):
|
||||
state = obj.state
|
||||
|
@ -40,7 +40,7 @@ def get_auth_token(request: func.HttpRequest) -> Optional[str]:
|
||||
|
||||
|
||||
def parse_jwt_token(request: func.HttpRequest) -> Result[UserInfo]:
|
||||
""" Obtains the Access Token from the Authorization Header """
|
||||
"""Obtains the Access Token from the Authorization Header"""
|
||||
token_str = get_auth_token(request)
|
||||
if token_str is None:
|
||||
return Error(
|
||||
|
@ -366,7 +366,7 @@ class Node(BASE_NODE, ORMMixin):
|
||||
self.save()
|
||||
|
||||
def set_halt(self) -> None:
|
||||
""" Tell the node to stop everything. """
|
||||
"""Tell the node to stop everything."""
|
||||
self.set_shutdown()
|
||||
self.stop()
|
||||
self.set_state(NodeState.halt)
|
||||
|
@ -185,7 +185,7 @@ class Pool(BASE_POOL, ORMMixin):
|
||||
self.save()
|
||||
|
||||
def shutdown(self) -> None:
|
||||
""" shutdown allows nodes to finish current work then delete """
|
||||
"""shutdown allows nodes to finish current work then delete"""
|
||||
from .nodes import Node
|
||||
from .scalesets import Scaleset
|
||||
|
||||
@ -207,7 +207,7 @@ class Pool(BASE_POOL, ORMMixin):
|
||||
self.save()
|
||||
|
||||
def halt(self) -> None:
|
||||
""" halt the pool immediately """
|
||||
"""halt the pool immediately"""
|
||||
|
||||
from .nodes import Node
|
||||
from .scalesets import Scaleset
|
||||
|
Reference in New Issue
Block a user