question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add type hints to `eth.tools.builder` modules

See original GitHub issue

What is wrong?

The eth.tools.builder module is not type hinted. This makes using it in the trinity module not possible.

How can it be fixed

Add type hints.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
Bhargavasomucommented, Nov 12, 2018

This issue can be closed as it has been taken care of in #1420

0reactions
Bhargavasomucommented, Oct 7, 2018

@cburgdorf I added the hints for most of the functions, but I am still getting the same error when I do this. mypy --follow-imports=silent --ignore-missing-imports --no-strict-optional --check-untyped-defs --disallow-incomplete-defs --disallow-untyped-defs --disallow-any-generics scripts/benchmark

The error is as follows scripts/benchmark/utils/chain_plumbing.py:80 error: Cannot call function of unknown type The error is still occurring even though I added the type hints. So I ran the following command mypy --follow-imports=silent --ignore-missing-imports chain_plumbing.py I got no error while doing the above command, but got the error only when executing the whole benchmarks altogether. Is there something that we could infer from this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add type hints and expose them via PEP561 #1112 - GitHub
The web3.py library isn't written with type hints. This needs to be fixed by: Adding all missing type hints. Enforcing type checking in...
Read more >
Python Type Hints: How to Gradually Add Types for Third ...
One place you can apply graduality with Mypy is in the type hints for third party packages. The default course of action is...
Read more >
How do I type hint a method with the type of the enclosing class?
Enable experimentation with new type system PEPs before they are accepted and added to the typing module. Currently, typing-extensions officially supports ...
Read more >
Python typing module - Use type checkers effectively
Type Hints / Type Annotations​​ We can annotate a function to specify its return type and the types of its parameters. This informs...
Read more >
Type hints - The Blue Book
Type hints are the Python native way to define the type of the objects in a program. Traditionally, the Python interpreter handles types...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found