This repository was archived by the owner on Aug 12, 2025. It is now read-only.
Commit 7b1ebf5
Do not assume hasattr is available in Metric.__del__
Python does not guarantee that builtins are available by the time __del__
is called, so using hasattr is unsafe.
PiperOrigin-RevId: 2542556381 parent 3e3b915 commit 7b1ebf5
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | | - | |
127 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
128 | 132 | | |
129 | 133 | | |
130 | 134 | | |
| |||
0 commit comments