Skip to content

Commit

Permalink
Linter formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
richo-anyscale committed Nov 19, 2024
1 parent b8f6514 commit eb8275a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 7 additions & 5 deletions python/ray/dashboard/modules/job/tests/test_job_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,13 @@ def get_node_ip_by_id(node_id: str) -> str:
node = get_node(id=node_id)
return node.node_ip

class JobAgentSubmissionBrowserClient(JobAgentSubmissionClient):

class JobAgentSubmissionBrowserClient(JobAgentSubmissionClient):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self._session.headers["User-Agent"] = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"

self._session.headers[
"User-Agent"
] = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"


@pytest_asyncio.fixture
Expand Down Expand Up @@ -285,7 +286,9 @@ async def test_submit_job(job_sdk_client, runtime_env_option, monkeypatch):


@pytest.mark.asyncio
async def test_submit_job_rejects_browsers(job_sdk_client, runtime_env_option, monkeypatch):
async def test_submit_job_rejects_browsers(
job_sdk_client, runtime_env_option, monkeypatch
):
# This flag allows for local testing of runtime env conda functionality
# without needing a built Ray wheel. Rather than insert the link to the
# wheel into the conda spec, it links to the current Python site.
Expand All @@ -296,7 +299,6 @@ async def test_submit_job_rejects_browsers(job_sdk_client, runtime_env_option, m
agent_address = agent_client._agent_address
agent_client = JobAgentSubmissionBrowserClient(agent_address)


runtime_env = runtime_env_option["runtime_env"]
runtime_env = upload_working_dir_if_needed(runtime_env, logger=logger)
runtime_env = upload_py_modules_if_needed(runtime_env, logger=logger)
Expand Down
4 changes: 3 additions & 1 deletion python/ray/util/state/custom_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ def validate_protobuf_enum(grpc_enum, custom_enum):
# Sometimes, the grpc enum is mocked, and it
# doesn't include any values in that case.
if len(enum_vals) > 0:
assert enum_vals == set(custom_enum), "Literals and protos out of sync, consider building //:install_py_proto with bazel?"
assert enum_vals == set(
custom_enum
), "Literals and protos out of sync, consider building //:install_py_proto with bazel?"


# Do the enum validation here.
Expand Down

0 comments on commit eb8275a

Please sign in to comment.