Skip to content

Commit

Permalink
Python 3.10 improvements (#1139)
Browse files Browse the repository at this point in the history
## Description

Follow-up PR for #1133 but purely esthetic, no functional changes

Cleans up the code to make it more in comformance with Python 3.10
capabilities.

Replaces:
 - type `Union` with `|`
 - type `Dict`/`Set`/`List`/`Tuple` with `dict`/`set`/`list`/`tuple`
 - `Optional` with ` | None`
 - `if:` ... `elif`... -> `match`

Fixes: 
 - `gdb.events.*Event` -> `gdb.*Event`
- `GefHeapManager.malloc_align_address` had its `ceil` lambda moved as a
proper (nested) function

Lint:
 - `except:` -> `except Exception:`
 - removed a bunch of unused f-strings
 - `if not .. in ..` -> `if .. not in ..`
 - some short named variables renamed
  • Loading branch information
hugsy authored Nov 10, 2024
1 parent 4dccd78 commit 0f21eea
Show file tree
Hide file tree
Showing 6 changed files with 433 additions and 431 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ debug.log
htmlcov
.benchmarks
site/
untracked/
Loading

0 comments on commit 0f21eea

Please sign in to comment.