kaxil commented on code in PR #44216:
URL: https://github.com/apache/airflow/pull/44216#discussion_r1850596643


##########
airflow/traces/tracer.py:
##########
@@ -54,19 +55,15 @@ def wrapper(*args, **kwargs):
         else:
             component = module_name
         with Trace.start_span(span_name=func_name, component=component):
-            if len(inspect.signature(func).parameters) > 0:
-                return func(*args, **kwargs)
-            else:
-                return func()
+            return func(*args, **kwargs)
 
     return wrapper
 
 
 class EmptyContext:
     """If no Tracer is configured, EmptyContext is used as a fallback."""
 
-    def __init__(self):
-        self.trace_id = 1

Review Comment:
   No need of `__init__` here



##########
airflow/traces/tracer.py:
##########
@@ -54,19 +55,15 @@ def wrapper(*args, **kwargs):
         else:
             component = module_name
         with Trace.start_span(span_name=func_name, component=component):
-            if len(inspect.signature(func).parameters) > 0:
-                return func(*args, **kwargs)
-            else:
-                return func()

Review Comment:
   Redundant



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to