Giter Club home page Giter Club logo

Comments (4)

j2kun avatar j2kun commented on August 16, 2024

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.

j2kun avatar j2kun commented on August 16, 2024

For numba, maybe see https://stackoverflow.com/questions/42310278/using-python-type-hints-with-numba

from riemann-divisor-sum.

j2kun avatar j2kun commented on August 16, 2024

For gmpy2, my first attempt at stubbing failed. Cf. python/typeshed#5031

from riemann-divisor-sum.

j2kun avatar j2kun commented on August 16, 2024

Fixed by #24

Ignoring missing stubs for now

from riemann-divisor-sum.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.