diff --git a/python_modules/dagster/dagster/_core/execution/context/compute.py b/python_modules/dagster/dagster/_core/execution/context/compute.py index 4a3079c09316c..6bac3e12231ce 100644 --- a/python_modules/dagster/dagster/_core/execution/context/compute.py +++ b/python_modules/dagster/dagster/_core/execution/context/compute.py @@ -1458,7 +1458,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")) @@ -1529,13 +1529,13 @@ def step_launcher(self) -> Optional[StepLauncher]: @public @property def job_def(self) -> JobDefinition: - """JobDefinition: The currently executing pipeline.""" + """JobDefinition: The currently executing job.""" return self.op_execution_context.job_def @public @property def job_name(self) -> str: - """str: The name of the currently executing pipeline.""" + """str: The name of the currently executing job.""" return self.op_execution_context.job_name @public 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." )