Comments (4)
First run of mypy reports 29 errors
riemann/types.py:97: error: Incompatible types in assignment (expression has type "None", variable has type "datetime")
riemann/types.py:98: error: Incompatible types in assignment (expression has type "None", variable has type "datetime")
riemann/types.py:122: error: Incompatible types in assignment (expression has type "None", variable has type "str")
riemann/superabundant.py:6: error: Cannot find implementation or library stub for module named 'gmpy2'
riemann/superabundant.py:7: error: Cannot find implementation or library stub for module named 'numba'
riemann/divisor.py:5: error: Cannot find implementation or library stub for module named 'numba'
riemann/divisor.py:5: note: See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports
riemann/divisor.py:43: error: No overload variant of "__setitem__" of "list" matches argument types "int", "RiemannDivisorSum"
riemann/divisor.py:43: note: Possible overload variants:
riemann/divisor.py:43: note: def __setitem__(self, int, None) -> None
riemann/divisor.py:43: note: def __setitem__(self, slice, Iterable[None]) -> None
riemann/divisor.py:47: error: Incompatible return value type (got "List[None]", expected "List[RiemannDivisorSum]")
riemann/search_strategy.py:71: error: Argument 1 of "max" is incompatible with supertype "SearchStrategy"; supertype defines the argument type as "List[SearchIndex]"
riemann/search_strategy.py:71: note: This violates the Liskov substitution principle
riemann/search_strategy.py:71: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
riemann/search_strategy.py:74: error: Argument 1 of "starting_from" is incompatible with supertype "SearchStrategy"; supertype defines the argument type as "SearchIndex"
riemann/search_strategy.py:74: note: This violates the Liskov substitution principle
riemann/search_strategy.py:74: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
riemann/search_strategy.py:95: error: "SearchIndex" has no attribute "n"
riemann/search_strategy.py:114: error: Argument 1 of "max" is incompatible with supertype "SearchStrategy"; supertype defines the argument type as "List[SearchIndex]"
riemann/search_strategy.py:114: note: This violates the Liskov substitution principle
riemann/search_strategy.py:114: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
riemann/search_strategy.py:123: error: Argument 1 of "starting_from" is incompatible with supertype "SearchStrategy"; supertype defines the argument type as "SearchIndex"
riemann/search_strategy.py:123: note: This violates the Liskov substitution principle
riemann/search_strategy.py:123: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides
riemann/search_strategy.py:171: error: "SearchIndex" has no attribute "level"
riemann/search_strategy.py:173: error: "SearchIndex" has no attribute "level"
riemann/search_strategy.py:174: error: "SearchIndex" has no attribute "index_in_level"
riemann/search_strategy.py:179: error: "SearchIndex" has no attribute "level"
riemann/search_strategy.py:184: error: "SearchIndex" has no attribute "index_in_level"
riemann/search_strategy.py:185: error: "SearchIndex" has no attribute "index_in_level"
riemann/postgres_database.py:5: error: Cannot find implementation or library stub for module named 'psycopg2.extras'
riemann/postgres_database.py:5: error: Cannot find implementation or library stub for module named 'psycopg2'
riemann/postgres_database.py:6: error: Cannot find implementation or library stub for module named 'gmpy2'
riemann/postgres_database.py:129: error: Argument "largest_computed_n" to "SummaryStats" has incompatible type "None"; expected "RiemannDivisorSum"
riemann/postgres_database.py:130: error: Argument "largest_witness_value" to "SummaryStats" has incompatible type "None"; expected "RiemannDivisorSum"
riemann/postgres_database.py:192: error: Return type "Optional[SearchMetadata]" of "claim_next_search_block" incompatible with return type "SearchMetadata" in supertype "DivisorDb"
riemann/in_memory_database.py:75: error: Argument "largest_computed_n" to "SummaryStats" has incompatible type "None"; expected "RiemannDivisorSum"
riemann/in_memory_database.py:76: error: Argument "largest_witness_value" to "SummaryStats" has incompatible type "None"; expected "RiemannDivisorSum"
riemann/cleanup_stale_blocks.py:38: error: Argument 2 to "get_stale_blocks" has incompatible type "Optional[timedelta]"; expected "timedelta"
riemann/cleanup_stale_blocks.py:53: error: Argument 1 to "sleep" has incompatible type "Optional[int]"; expected "float"
Found 29 errors in 7 files (checked 13 source files)
from riemann-divisor-sum.
For numba, maybe see https://stackoverflow.com/questions/42310278/using-python-type-hints-with-numba
from riemann-divisor-sum.
For gmpy2, my first attempt at stubbing failed. Cf. python/typeshed#5031
from riemann-divisor-sum.
Fixed by #24
Ignoring missing stubs for now
from riemann-divisor-sum.
Related Issues (14)
- Bug with usage of CachedPartitionsOfN
- Add a worker job to mark stale "in_progress" blocks as "failed" HOT 1
- Start time and end times are the same in production HOT 2
- Overflow error HOT 3
- Setup automated test runs HOT 2
- Add alerting when processor jobs fail HOT 6
- Add a simple script to automate deploying updated jobs
- Add verification script for ensuring we don't skip any search blocks
- Add an automated database backup HOT 1
- Visualize some data! HOT 5
- Look for patterns in the prime factorizations of numbers with large witness values
- Try exploring colossally abundant numbers
- Bug in superabundant -> partitions_of_n function HOT 5
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 riemann-divisor-sum.