Skip to content

Commit 8264a14

Browse files
martindemellorchen152
authored andcommitted
rewrite: do not log lookups of builtins and typing classes
PiperOrigin-RevId: 623592068
1 parent 70f7609 commit 8264a14

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pytype/rewrite/abstract/classes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ def set_attribute(self, name: str, value: base.BaseValue) -> None:
8585
def instantiate(self) -> 'FrozenInstance':
8686
"""Creates an instance of this class."""
8787
if self._canonical_instance:
88-
log.info('Getting cached instance of class %s', self.full_name)
88+
if self.module not in ('builtins', 'typing'):
89+
log.info('Getting cached instance of class %s', self.full_name)
8990
return self._canonical_instance
9091
log.info('Instantiating class %s', self.full_name)
9192
for setup_method_name in self.setup_methods:

0 commit comments

Comments
 (0)