You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by GitBox <gi...@apache.org> on 2020/03/18 02:29:49 UTC

[GitHub] [beam] udim commented on a change in pull request #11038: [BEAM-7746] More typing fixes

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:
users@infra.apache.org


With regards,
Apache Git Services