Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.10 improvements #1139

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Python 3.10 improvements #1139

wants to merge 12 commits into from

Conversation

hugsy
Copy link
Owner

@hugsy hugsy commented Sep 24, 2024

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

@hugsy hugsy added this to the 2024.09 milestone Sep 24, 2024
@hugsy hugsy self-assigned this Sep 24, 2024
Copy link

🤖 Coverage update for cde95b3 🟢

Old New
Commit f298b7f cde95b3
Score 71.6267% 71.6267% (0)

Repository owner deleted a comment from Grazfather Nov 1, 2024
Repository owner deleted a comment from Grazfather Nov 1, 2024
Repository owner deleted a comment from Grazfather Nov 1, 2024
Repository owner deleted a comment from Grazfather Nov 1, 2024
Repository owner deleted a comment from Grazfather Nov 1, 2024
Repository owner deleted a comment from Grazfather Nov 1, 2024
Repository owner deleted a comment from Grazfather Nov 1, 2024
Repository owner deleted a comment from Grazfather Nov 1, 2024
@hugsy
Copy link
Owner Author

hugsy commented Nov 1, 2024

I removed all comments because the PR is still draft and having those messes up how VSCode displays them directly into my code.

Don't review until ready

Copy link

github-actions bot commented Nov 1, 2024

🤖 Coverage update for 32311d7 🟢

Old New
Commit f298b7f 32311d7
Score 71.2662% 71.2662% (0)

Copy link

github-actions bot commented Nov 2, 2024

🤖 Coverage update for 741ce7c 🟢

Old New
Commit f298b7f 741ce7c
Score 71.2662% 71.2662% (0)

Copy link

github-actions bot commented Nov 2, 2024

🤖 Coverage update for 854912b 🟢

Old New
Commit 5376d78 854912b
Score 71.2662% 71.2662% (0)

Copy link

github-actions bot commented Nov 2, 2024

🤖 Coverage update for f47f51e 🟢

Old New
Commit 5376d78 f47f51e
Score 71.2662% 71.2662% (0)

Copy link

github-actions bot commented Nov 2, 2024

🤖 Coverage update for d5d544d 🟢

Old New
Commit 5376d78 d5d544d
Score 71.2662% 71.2662% (0)

Copy link

github-actions bot commented Nov 2, 2024

🤖 Coverage update for 60be6a1 🟢

Old New
Commit 5376d78 60be6a1
Score 71.2662% 71.2662% (0)

Copy link

github-actions bot commented Nov 2, 2024

🤖 Coverage update for dc28938 🟢

Old New
Commit 5376d78 dc28938
Score 71.2662% 71.2662% (0)

@hugsy hugsy marked this pull request as ready for review November 2, 2024 21:13
Copy link

github-actions bot commented Nov 2, 2024

🤖 Coverage update for 417ac63 🟢

Old New
Commit 5376d78 417ac63
Score 71.2662% 71.2662% (0)

Copy link

github-actions bot commented Nov 2, 2024

🤖 Coverage update for 417ac63 🔴

Old New
Commit 5376d78 417ac63
Score 71.2662% 71.197% (-0.0692)

Copy link

github-actions bot commented Nov 3, 2024

🤖 Coverage update for 9fb1d71 🔴

Old New
Commit 5376d78 9fb1d71
Score 71.2662% 71.197% (-0.0692)

Copy link

github-actions bot commented Nov 3, 2024

🤖 Coverage update for 9fb1d71 🟢

Old New
Commit 5376d78 9fb1d71
Score 71.2662% 71.2662% (0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant