Skip to content

Commit

Permalink
Killing the last inconsistencies through type hints (#1052)
Browse files Browse the repository at this point in the history
## Description

This PR is purely esthetic but fixes a few extra inconsistencies thanks
to type hints, using `pylint` and `pylance`.
Both pass now reporting no error, warning or info!

Among other fixes:
 * removed unused vars
 * `f-string`-ify more
 * enforce (using `assert`) expected type to variable when appropriate
 * fixed some bad type names in `gdb.events.*`
 * the config manager allows to receive non basic types
 * applied all the type issues spotted by pylance using the gdb.pyi stub
* a lot of `staticmethod` have been made non static because we can use
`gef.gdb.commands["XXX"]` instead

With this PR :
 * `pylint` on gef and tests/*.py shows a 10/10 score


![image](https://github.com/hugsy/gef/assets/590234/2ac4b0b4-ea95-4a35-a6e0-fd65b8e15b7f)

 * `pylance` shows no error 


![image](https://github.com/hugsy/gef/assets/590234/9a99b7a1-1c04-48b3-ace4-c7e56d8c5d61)

---------

Co-authored-by: Grazfather <[email protected]>
  • Loading branch information
hugsy and Grazfather authored Jan 25, 2024
1 parent e604ab4 commit 570cc03
Show file tree
Hide file tree
Showing 4 changed files with 434 additions and 344 deletions.
Loading

0 comments on commit 570cc03

Please sign in to comment.