Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/ray/dashboard/modules/node/tests/test_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def test_worker_pids_reported(enable_test_module, ray_start_with_dashboard):
webui_url = format_web_url(webui_url)
node_id = ray_start_with_dashboard["node_id"]

@ray.remote(runtime_env={"uv": {"packages": ["requests==2.3.0"]}})
@ray.remote(runtime_env={"uv": {"packages": ["requests==2.32.5"]}})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve maintainability and avoid using a magic string for the version number, consider defining '2.32.5' as a constant at the top of the file. For example: _REQUESTS_VERSION_FOR_TEST = '2.32.5'. You could then use an f-string here: f'requests=={_REQUESTS_VERSION_FOR_TEST}'. This would make the version number easier to find and update if it's ever used in more than one place in this test file.

class UvActor:
def get_pid(self):
return os.getpid()
Expand Down