Comments (4)
@carljm can you please guide me here on how to proceed? Please let me know if you require more information on this, I would be happy to work on this
from monkeytype.
Hi @sagarbadiyani -- unfortunately it may be up to a few weeks before I have time to dig into this issue and recommend what I think is the best approach; it looks like it's a bit subtle. If you are able to reach a solution sooner that you are confident is the correct one, I can try to find time to look at a PR.
from monkeytype.
Sure, @carljm, I will try to solutionize this.
Thank you.
from monkeytype.
@sagarbadiyani I've encountered the same issue on Python 3.7.3.
The fix that worked for me was:
- if elem_type_dicts is not None and is_generic(typ):
+ if elem_type_dicts and is_generic(typ):
elem_types = tuple(type_from_dict(e) for e in elem_type_dicts)
# mypy complains that a value of type `type` isn't indexable. That's
# true, but we know typ is a subtype that is indexable. Even checking
# with hasattr(typ, '__getitem__') doesn't help
+ if elem_types:
- typ = typ[elem_types] # type: ignore[index]
+ typ = typ[elem_types] # type: ignore[index]
from monkeytype.
Related Issues (20)
- Compare observed types to existing type annotations HOT 1
- Empty lists result in overly broad types HOT 1
- Better documentation for how to use MonkeyType with multiple processes/threads HOT 3
- Collect types for non-module functions HOT 1
- provide a type rewriter to find common base class HOT 5
- how open Instagram without password
- Adding an index to monkeytype.sqlite3 speeds up stub generation HOT 1
- Keyword-only arguments are not captured in traces
- Calls to locally defined functions are not captured
- `*args` and `**kwargs` are not captured in traces HOT 1
- Add pre-commit support HOT 2
- `AttributeError: 'ellipsis' object has no attribute '__qualname__'` HOT 1
- pep_563 flag creates imports that don't match the usage of the name HOT 4
- Support PEP 585 - list[int] instead of typing.List[int]
- Stubs with positional-only args output too many slashes and cause a SyntaxError
- Error when parameter in external file is class defined in `__main__` HOT 1
- Return type not traced when returning constant (Python ≥ 3.12)
- monkeytype apply seems to attempt to import my whole program, causing monkeytype: error: unrecognized arguments:
- checking instagrm password
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from monkeytype.