guardicore/monkey

Fix problems that prevent mypy from running cleanly

Open

#2225 opened on Aug 29, 2022

View on GitHub
 (0 comments) (0 reactions) (0 assignees)Python (6,250 stars) (752 forks)batch import
Code QualityComplexity: MediumHelp wantedImpact: Medium

Description

Is your feature request related to a problem? Please describe. Running mypy on the project results in 168 errors at the time of this writing. A significant portion of these errors are due to missing stubs for the following packages:

- boto3
- botocore
- bson
- Gevent
- gridfs
- flask_pymongo
- flask_restful
- impacket
- ldaptor
- marshmallow_enum
- Mongoengine
- netifaces
- nmb
- ntsecuritycon
- odict
- psutil
- pubsub
- pyAesCrypt
- Pyinstaller
- pymongo
- pymssql
- pypykatz
- pysub
- ring
- win32api
- win32con
- win32event
- win32file
- win32job
- win32process
- win32security
- winsys
monkey/monkey$ mypy --exclude tests/ common/ infection_monkey/ monkey_island --explicit-package-bases --namespace-packages
monkey_island/setup/gevent_setup.py:1: error: Skipping analyzing "gevent": module is installed, but missing library stubs or py.typed marker
monkey_island/docs/source/conf.py:213: error: Need type annotation for "latex_elements" (hint: "latex_elements: Dict[<type>, <type>] = ...")
monkey_island/cc/database.py:1: error: Skipping analyzing "gridfs": module is installed, but missing library stubs or py.typed marker
...
Found 168 errors in 103 files (checked 568 source files)

Describe the solution you'd like Fix the errors so that mypy runs cleanly.

Contributor guide