From bafb741a7c898396c390e6532711886fa164d693 Mon Sep 17 00:00:00 2001 From: JamieDeMaria Date: Mon, 4 Dec 2023 11:35:10 -0500 Subject: [PATCH] pr commens --- .../_core/execution/context/compute.py | 2 +- .../test_asset_execution_context.py | 24 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/python_modules/dagster/dagster/_core/execution/context/compute.py b/python_modules/dagster/dagster/_core/execution/context/compute.py index 14b8d37314d2a..d425da5330c80 100644 --- a/python_modules/dagster/dagster/_core/execution/context/compute.py +++ b/python_modules/dagster/dagster/_core/execution/context/compute.py @@ -1469,7 +1469,7 @@ def run(self) -> DagsterRun: @deprecated(**_get_deprecation_kwargs("dagster_run")) @property def dagster_run(self) -> DagsterRun: - """DagsterRun: The current pipeline run.""" + """DagsterRun: The current job run.""" return self.op_execution_context.dagster_run @deprecated(**_get_deprecation_kwargs("run_id")) diff --git a/python_modules/dagster/dagster_tests/core_tests/execution_tests/test_asset_execution_context.py b/python_modules/dagster/dagster_tests/core_tests/execution_tests/test_asset_execution_context.py index d9f73b2734454..5adc21c811dfc 100644 --- a/python_modules/dagster/dagster_tests/core_tests/execution_tests/test_asset_execution_context.py +++ b/python_modules/dagster/dagster_tests/core_tests/execution_tests/test_asset_execution_context.py @@ -134,33 +134,33 @@ def test_context(context: AssetExecutionContext): deprecation_info, expected_deprecation_args ) - for method in dir(op_context): + for attr in dir(op_context): if ( - method in asset_context_not_deprecated - or method[:2] == "__" - or method in op_context_properties - or method in other_ignores + attr in asset_context_not_deprecated + or attr[:2] == "__" + or attr in op_context_properties + or attr in other_ignores ): continue - if inspect.ismethod(getattr(op_context, method)): - assert method in dir(asset_context) + if inspect.ismethod(getattr(op_context, attr)): + assert attr in dir(asset_context) try: - deprecation_info = getattr(asset_context, method)._deprecated # noqa: SLF001 + deprecation_info = getattr(asset_context, attr)._deprecated # noqa: SLF001 except Exception: raise Exception( - f"Method {method} on OpExecutionContext does not have an implementation on" + f"Method {attr} on OpExecutionContext does not have an implementation on" " AssetExecutionContext. All methods on OpExecutionContext must be" " re-implemented on AssetExecutionContext with appropriate deprecation" " warnings. See the class implementation of AssetExecutionContext for more" " details." ) - expected_deprecation_args = _get_deprecation_kwargs(method) + expected_deprecation_args = _get_deprecation_kwargs(attr) assert_deprecation_messages_as_expected(deprecation_info, expected_deprecation_args) else: raise Exception( - f"Method {method} on OpExecutionContext not accounted for in AssetExecutionContext deprecation" - f" test. Ensure that the method {method} exists on AssetExecutionContext, or is explicitly ignored in" + f"Method {attr} on OpExecutionContext not accounted for in AssetExecutionContext deprecation" + f" test. Ensure that the method {attr} exists on AssetExecutionContext, or is explicitly ignored in" " the test." )