Comments (1)
Hi! It looks like you're facing a type-checking issue with Pyre when filtering tuples that might contain None
in their second element. Pyre seems to struggle with inferring that after filtering, the second element of the tuples is indeed always a string and not None
. Normally, you'd expect Pyre to recognize that the lambda function ensures no None
values remain in the second element, so the output should be Iterable[Tuple[str, str]]
. However, it incorrectly interprets it as Iterable[Tuple[str, Optional[str]]]
. A practical workaround is to use a list comprehension instead of the filter function. This alternative approach usually provides clearer type hints that help static analysis tools like Pyre understand the intended types more accurately.
from pyre-check.
Related Issues (20)
- Tainting Python Builtin Functions! How do we do this? HOT 1
- Module boto3 - Taint Propagation Issue HOT 3
- Context Manager - Taint Propagation Issue HOT 6
- PySpark - Incompatible parameter type & Unsupported operand HOT 1
- [Pyre setup.sh] Terminal closes while building from source HOT 2
- Pysa tutorial not working HOT 4
- Errors with recursive type aliases: "JSON is declared to have type `TypeAlias` but is used as type `UnionType`"
- pyre from PyPI can't find its typeshed directory HOT 1
- Update pyre-check.org/play to use Python 3.11 HOT 2
- [BUG] Check command exited with non-zero return code: 126. HOT 1
- CI builds are broken
- Pyre / Pysa unable to analyse files with same name in different folders HOT 2
- Taint config on "Running Pysa" page is invalid HOT 1
- `reveal_type` does not work reliably HOT 3
- Unable to get SQLAlchemy sinks to work HOT 4
- Pyre failing in python 3.8 and 3.9 due to new syntax HOT 9
- How to resolve importing a function from a module with same name HOT 6
- `input` is not part of the environment, no module `input` in search path. HOT 2
- Cannot resolve type for pymysql HOT 2
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 pyre-check.