udim commented on a change in pull request #11038: [BEAM-7746] More typing fixes
URL: https://github.com/apache/beam/pull/11038#discussion_r393289270
 
 

 ##########
 File path: sdks/python/apache_beam/metrics/metric.py
 ##########
 @@ -56,7 +55,7 @@ class Metrics(object):
   @staticmethod
   def get_namespace(namespace):
     # type: (Union[Type, str]) -> str
-    if inspect.isclass(namespace):
+    if isinstance(namespace, type):
 
 Review comment:
   Hopefully no one uses old-style classes any more (types.ClassType).

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to