Commit 65d9a72
chore: add @OverRide decorators to LoggingPlugin callback methods
Merge #4572
### Link to Issue or Description of Change
**1. Link to an existing issue (if applicable):**
- Closes: #4496
**2. Or, if no issue exists, describe the change:**
**Problem:**
`LoggingPlugin` overrides 12 callback methods from `BasePlugin` but none use the `@override` decorator. Every other plugin in the package (`DebugLoggingPlugin`, `ReplayPlugin`, `RecordingsPlugin`, `EnsureRetryOptionsPlugin`, `_RequestIntercepterPlugin`) already follows this practice. With `mypy --strict` enabled in `pyproject.toml`, missing `@override` means renamed or removed base-class methods would be silently missed in `LoggingPlugin` while being caught everywhere else.
**Solution:**
Import `override` from `typing_extensions` and decorate all 12 overridden callbacks. Purely additive: one import line and 12 decorators. No behavioral, API, or runtime change.
### Testing Plan
**Unit Tests:**
- [ ] I have added or updated unit tests for my change.
- [x] All unit tests pass locally.
No new tests are required — `@override` is a static-analysis-only decorator with no runtime effect. Ran `mypy` on the file before and after the change: same preexisting warnings, no new errors introduced. CI will validate via the existing test suite and linting checks.
**Manual End-to-End (E2E) Tests:**
Not applicable. This change adds only decorators with no runtime behavior. Verified by comparing `mypy` output before and after — no new errors.
### Checklist
- [x] I have read the [CONTRIBUTING.md](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) document.
- [x] I have performed a self-review of my own code.
- [x] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [x] New and existing unit tests pass locally with my changes.
- [ ] I have manually tested my changes end-to-end.
- [ ] Any dependent changes have been merged and published in downstream modules.
### Additional context
I am the author of the original issue (#4496). A previous PR (#4544) was opened but is pending clarification, so I'm
submitting this complete PR as the original issue author.
COPYBARA_INTEGRATE_REVIEW=#4572 from cchinchilla-dev:feat/add_override_decorators_to_loggingplugin_4496 142ed87
PiperOrigin-RevId: 8758119661 parent 4dd4d5e commit 65d9a72
1 file changed
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| |||
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| 92 | + | |
90 | 93 | | |
91 | 94 | | |
92 | 95 | | |
| |||
99 | 102 | | |
100 | 103 | | |
101 | 104 | | |
| 105 | + | |
102 | 106 | | |
103 | 107 | | |
104 | 108 | | |
| |||
122 | 126 | | |
123 | 127 | | |
124 | 128 | | |
| 129 | + | |
125 | 130 | | |
126 | 131 | | |
127 | 132 | | |
| |||
134 | 139 | | |
135 | 140 | | |
136 | 141 | | |
| 142 | + | |
137 | 143 | | |
138 | 144 | | |
139 | 145 | | |
| |||
145 | 151 | | |
146 | 152 | | |
147 | 153 | | |
| 154 | + | |
148 | 155 | | |
149 | 156 | | |
150 | 157 | | |
| |||
154 | 161 | | |
155 | 162 | | |
156 | 163 | | |
| 164 | + | |
157 | 165 | | |
158 | 166 | | |
159 | 167 | | |
| |||
179 | 187 | | |
180 | 188 | | |
181 | 189 | | |
| 190 | + | |
182 | 191 | | |
183 | 192 | | |
184 | 193 | | |
| |||
206 | 215 | | |
207 | 216 | | |
208 | 217 | | |
| 218 | + | |
209 | 219 | | |
210 | 220 | | |
211 | 221 | | |
| |||
221 | 231 | | |
222 | 232 | | |
223 | 233 | | |
| 234 | + | |
224 | 235 | | |
225 | 236 | | |
226 | 237 | | |
| |||
237 | 248 | | |
238 | 249 | | |
239 | 250 | | |
| 251 | + | |
240 | 252 | | |
241 | 253 | | |
242 | 254 | | |
| |||
251 | 263 | | |
252 | 264 | | |
253 | 265 | | |
| 266 | + | |
254 | 267 | | |
255 | 268 | | |
256 | 269 | | |
| |||
0 commit comments