Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
flow3r firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dos
flow3r firmware
Commits
22158556
Commit
22158556
authored
Aug 12, 2023
by
Anon
Browse files
Options
Downloads
Patches
Plain Diff
mypystubs: more geese (Generator)
parent
69ac2434
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
python_payload/st3m/goose.py
+13
-2
13 additions, 2 deletions
python_payload/st3m/goose.py
with
13 additions
and
2 deletions
python_payload/st3m/goose.py
+
13
−
2
View file @
22158556
...
@@ -17,7 +17,7 @@ if TYPE_CHECKING:
...
@@ -17,7 +17,7 @@ if TYPE_CHECKING:
class
ABCBase
(
metaclass
=
ABCMeta
):
class
ABCBase
(
metaclass
=
ABCMeta
):
pass
pass
from
typing
import
List
,
Optional
,
Tuple
,
Dict
,
Any
,
Callable
,
Iterator
from
typing
import
List
,
Optional
,
Tuple
,
Dict
,
Any
,
Callable
,
Iterator
,
Generator
from
enum
import
Enum
from
enum
import
Enum
else
:
else
:
# We're in CPython or Micropython.
# We're in CPython or Micropython.
...
@@ -31,7 +31,16 @@ else:
...
@@ -31,7 +31,16 @@ else:
return
_fail
return
_fail
try
:
try
:
from
typing
import
List
,
Optional
,
Tuple
,
Dict
,
Any
,
Callable
,
Iterator
from
typing
import
(
List
,
Optional
,
Tuple
,
Dict
,
Any
,
Callable
,
Iterator
,
Generator
,
)
from
enum
import
Enum
from
enum
import
Enum
except
ImportError
:
except
ImportError
:
# We're in Micropython.
# We're in Micropython.
...
@@ -42,6 +51,7 @@ else:
...
@@ -42,6 +51,7 @@ else:
Any
=
None
Any
=
None
Callable
=
None
Callable
=
None
Iterator
=
None
Iterator
=
None
Generator
=
None
class
Enum
:
class
Enum
:
pass
pass
...
@@ -59,4 +69,5 @@ __all__ = [
...
@@ -59,4 +69,5 @@ __all__ = [
"
Any
"
,
"
Any
"
,
"
Callable
"
,
"
Callable
"
,
"
Iterator
"
,
"
Iterator
"
,
"
Generator
"
,
]
]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment