beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject [beam] branch master updated: Use functools.wraps in @progress_indicator
Date Wed, 09 Jun 2021 20:05:54 GMT
This is an automated email from the ASF dual-hosted git repository.

ningk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 0cafed1  Use functools.wraps in @progress_indicator
     new fd9a6bd  Merge pull request #14957 from TheNeuralBit/interactive-beam-docs
0cafed1 is described below

commit 0cafed17e295d6c6fd2ba77d0c31348b3938fd22
Author: Brian Hulette <bhulette@google.com>
AuthorDate: Mon Jun 7 11:43:57 2021 -0700

    Use functools.wraps in @progress_indicator
---
 sdks/python/apache_beam/runners/interactive/utils.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sdks/python/apache_beam/runners/interactive/utils.py b/sdks/python/apache_beam/runners/interactive/utils.py
index 878ec23..bbe88ff 100644
--- a/sdks/python/apache_beam/runners/interactive/utils.py
+++ b/sdks/python/apache_beam/runners/interactive/utils.py
@@ -18,6 +18,7 @@
 """Utilities to be used in  Interactive Beam.
 """
 
+import functools
 import hashlib
 import json
 import logging
@@ -240,6 +241,7 @@ def progress_indicated(func):
 
   """A decorator using a unique progress indicator as a context manager to
   execute the given function within."""
+  @functools.wraps(func)
   def run_within_progress_indicator(*args, **kwargs):
     with ProgressIndicator('Processing...', 'Done.'):
       return func(*args, **kwargs)

Mime
View raw message