Commit 2c21763
fix(typing): resolve ty diagnostics in logging and metrics modules (#7953)
* fix(typing): resolve ty diagnostics in logging and metrics modules
- logging/buffer/functions.py: add guard clause for None values from dict.get() before comparison
- metrics/base.py: add cast for functools.wraps union type, add set_default_dimensions stub to base class
Resolves 3 of 10 diagnostics from #7929
* test(logging): add test for invalid log level handling
* chore: add pragma no cover for stub method
---------
Co-authored-by: Leandro Damascena <lcdama@amazon.pt>1 parent 3b96fa1 commit 2c21763
File tree
3 files changed
+16
-2
lines changed- aws_lambda_powertools
- logging/buffer
- metrics
- tests/unit/logger/required_dependencies
3 files changed
+16
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
124 | 127 | | |
125 | 128 | | |
126 | 129 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
378 | 382 | | |
379 | 383 | | |
380 | 384 | | |
| |||
428 | 432 | | |
429 | 433 | | |
430 | 434 | | |
431 | | - | |
| 435 | + | |
432 | 436 | | |
433 | 437 | | |
434 | 438 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
0 commit comments