guardicore/monkey

Fix problems that prevent mypy from running cleanly

Open

#2225 aperta il 29 ago 2022

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)Python (752 fork)batch import
Code QualityComplexity: MediumHelp wantedImpact: Medium

Metriche repository

Star
 (6250 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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.

Guida contributor