Repository: PrefectHQ/prefect

Issue:
Core docs language
https://docs.prefect.io/core/

In a few places the Core docs mention that Cloud is coming soon, and I believe the language should be updated.


Discussion:

Resolving patch:
diff --git a/src/prefect/engine/cache_validators.py b/src/prefect/engine/cache_validators.py
--- a/src/prefect/engine/cache_validators.py
+++ b/src/prefect/engine/cache_validators.py
@@ -181,9 +181,7 @@ def _partial_parameters_only(
         if duration_only(state, inputs, parameters) is False:
             return False
         elif validate_on is None:
-            return (
-                True
-            )  # if you dont want to validate on anything, then the cache is valid
+            return True  # if you dont want to validate on anything, then the cache is valid
         else:
             cached = state.cached_parameters or {}
             partial_provided = {
@@ -259,9 +257,7 @@ def _partial_inputs_only(
         if duration_only(state, inputs, parameters) is False:
             return False
         elif validate_on is None:
-            return (
-                True
-            )  # if you dont want to validate on anything, then the cache is valid
+            return True  # if you dont want to validate on anything, then the cache is valid
         else:
             cached = {
                 key: res.value for key, res in (state.cached_inputs or {}).items()


Test patch:
diff --git a/tests/client/test_client_auth.py b/tests/client/test_client_auth.py
--- a/tests/client/test_client_auth.py
+++ b/tests/client/test_client_auth.py
@@ -108,7 +108,7 @@ def test_save_local_settings(self):
                     assert toml.load(f)["api_token"] == "b"
 
     def test_load_local_api_token_is_called_when_the_client_is_initialized_without_token(
-        self
+        self,
     ):
         with tempfile.TemporaryDirectory() as tmp:
             with set_temporary_config({"home_dir": tmp}):
@@ -119,7 +119,7 @@ def test_load_local_api_token_is_called_when_the_client_is_initialized_without_t
                 assert client._api_token == "a"
 
     def test_load_local_api_token_is_called_when_the_client_is_initialized_without_token(
-        self
+        self,
     ):
         with tempfile.TemporaryDirectory() as tmp:
             with set_temporary_config({"home_dir": tmp}):
diff --git a/tests/core/test_task_map.py b/tests/core/test_task_map.py
--- a/tests/core/test_task_map.py
+++ b/tests/core/test_task_map.py
@@ -632,7 +632,7 @@ def take_sum(x):
     "executor", ["local", "sync", "mproc", "mthread"], indirect=True
 )
 def test_reduce_task_properly_applies_trigger_across_all_mapped_states_for_deep_pipelines(
-    executor
+    executor,
 ):
     @prefect.task
     def ll():
diff --git a/tests/engine/cloud/test_cloud_flow_runner.py b/tests/engine/cloud/test_cloud_flow_runner.py
--- a/tests/engine/cloud/test_cloud_flow_runner.py
+++ b/tests/engine/cloud/test_cloud_flow_runner.py
@@ -134,7 +134,7 @@ def test_flow_runner_raises_endrun_if_client_cant_retrieve_state(monkeypatch):
 
 
 def test_flow_runner_raises_endrun_with_correct_state_if_client_cant_retrieve_state(
-    monkeypatch
+    monkeypatch,
 ):
     flow = prefect.Flow(name="test")
     get_flow_run_info = MagicMock(side_effect=SyntaxError)
@@ -386,7 +386,7 @@ def is_p_three(p):
 
 
 def test_task_failure_with_upstream_secrets_doesnt_store_secret_value_and_recompute_if_necessary(
-    client
+    client,
 ):
     @prefect.task(max_retries=2, retry_delay=timedelta(seconds=100))
     def is_p_three(p):
@@ -497,7 +497,7 @@ def test_cloud_flow_runner_can_successfully_initialize_cloud_task_runners():
 
 
 def test_cloud_task_runners_submitted_to_remote_machines_respect_original_config(
-    monkeypatch
+    monkeypatch,
 ):
     """
     This test is meant to simulate the behavior of running a Cloud Flow against an external
diff --git a/tests/engine/cloud/test_cloud_task_runner.py b/tests/engine/cloud/test_cloud_task_runner.py
--- a/tests/engine/cloud/test_cloud_task_runner.py
+++ b/tests/engine/cloud/test_cloud_task_runner.py
@@ -166,7 +166,7 @@ def map(self, *args, **kwargs):
 
 
 def test_task_runner_raises_endrun_if_client_cant_communicate_during_state_updates(
-    monkeypatch
+    monkeypatch,
 ):
     @prefect.task(name="test")
     def raise_error():
@@ -270,7 +270,7 @@ def cached_task(x):
 
 
 def test_task_runner_validates_cached_state_inputs_with_upstream_handlers_if_task_has_caching(
-    client
+    client,
 ):
     class Handler(ResultHandler):
         def read(self, val):
@@ -305,7 +305,7 @@ def cached_task(x):
 
 
 def test_task_runner_validates_cached_state_inputs_if_task_has_caching_and_uses_task_handler(
-    client
+    client,
 ):
     class Handler(ResultHandler):
         def read(self, val):
@@ -360,7 +360,7 @@ def test_task_runner_raises_endrun_if_client_cant_receive_state_updates(monkeypa
 
 
 def test_task_runner_raises_endrun_with_correct_state_if_client_cant_receive_state_updates(
-    monkeypatch
+    monkeypatch,
 ):
     task = Task(name="test")
     get_task_run_info = MagicMock(side_effect=SyntaxError)
diff --git a/tests/engine/cloud/test_utilities.py b/tests/engine/cloud/test_utilities.py
--- a/tests/engine/cloud/test_utilities.py
+++ b/tests/engine/cloud/test_utilities.py
@@ -55,7 +55,7 @@ def test_preparing_state_for_cloud_passes_if_cached_inputs_dont_exist(cls):
     "cls", [s for s in cached_input_states if issubclass(s, Failed)]
 )
 def test_preparing_state_for_cloud_passes_if_cached_inputs_have_no_handler_for_failed(
-    cls
+    cls,
 ):
     xres = Result(3, result_handler=None)
     state = prepare_state_for_cloud(cls(cached_inputs=dict(x=xres)))
diff --git a/tests/engine/test_flow_runner.py b/tests/engine/test_flow_runner.py
--- a/tests/engine/test_flow_runner.py
+++ b/tests/engine/test_flow_runner.py
@@ -527,7 +527,7 @@ def determine_final_state(self, *args, **kwargs):
         assert new_state.message == "Very specific error message"
 
     def test_determine_final_state_preserves_running_states_when_tasks_still_running(
-        self
+        self,
     ):
         task = Task()
         flow = Flow(name="test", tasks=[task])
@@ -559,8 +559,8 @@ def test_retries_use_cached_inputs(self, executor):
 
         a_state = first_state.result[a_res]
         a_state.result = (
-            NoResult
-        )  # remove the result to see if the cached results are picked up
+            NoResult  # remove the result to see if the cached results are picked up
+        )
         b_state = first_state.result[b_res]
         b_state.cached_inputs = dict(x=Result(2))  # artificially alter state
 
@@ -588,8 +588,8 @@ def test_retries_cache_parameters_as_well(self, executor):
 
         a_state = first_state.result[a_res]
         a_state.result = (
-            NoResult
-        )  # remove the result to see if the cached results are picked up
+            NoResult  # remove the result to see if the cached results are picked up
+        )
         b_state = first_state.result[b_res]
         b_state.cached_inputs = dict(x=Result(2))  # artificially alter state
 
@@ -1370,7 +1370,7 @@ def grab_key():
         assert flow_state.result[grab_key].result == 42
 
     def test_flow_runner_passes_along_its_init_context_to_tasks_after_serialization(
-        self
+        self,
     ):
         @prefect.task
         def grab_key():
@@ -1400,7 +1400,7 @@ def return_scheduled_start_time():
         )
 
     def test_flow_runner_does_override_scheduled_start_time_when_running_off_schedule(
-        self
+        self,
     ):
         @prefect.task
         def return_scheduled_start_time():
@@ -1414,7 +1414,7 @@ def return_scheduled_start_time():
         assert res.result[return_scheduled_start_time].result == 42
 
     def test_flow_runner_doesnt_override_scheduled_start_time_when_running_on_schedule(
-        self
+        self,
     ):
         @prefect.task
         def return_scheduled_start_time():
diff --git a/tests/engine/test_task_runner.py b/tests/engine/test_task_runner.py
--- a/tests/engine/test_task_runner.py
+++ b/tests/engine/test_task_runner.py
@@ -1751,7 +1751,7 @@ def test_task_runner_performs_mapping(executor):
     "executor", ["local", "sync", "mproc", "mthread"], indirect=True
 )
 def test_task_runner_skips_upstream_check_for_parent_mapped_task_but_not_children(
-    executor
+    executor,
 ):
     add = AddTask(trigger=prefect.triggers.all_failed)
     ex = Edge(SuccessTask(), add, key="x")
diff --git a/tests/environments/storage/test_docker_storage.py b/tests/environments/storage/test_docker_storage.py
--- a/tests/environments/storage/test_docker_storage.py
+++ b/tests/environments/storage/test_docker_storage.py
@@ -176,7 +176,7 @@ def test_build_respects_user_provided_image_name_and_tag(monkeypatch):
 
 
 def test_build_respects_user_provided_image_name_and_tag_for_multiple_flows(
-    monkeypatch
+    monkeypatch,
 ):
     storage = Docker(registry_url="reg", image_name="CUSTOM", image_tag="TAG")
     storage.add_flow(Flow("test"))