Git Product home page Git Product logo

Comments (5)

maxbachmann avatar maxbachmann commented on June 16, 2024 1

This is part of v0.19.2

from levenshtein.

maxbachmann avatar maxbachmann commented on June 16, 2024

Thanks for reporting. I tried to add the type stubs. However I am unsure why it fails the type stub test for jaro and jaro_winkler: https://github.com/maxbachmann/Levenshtein/runs/7311103290?check_suite_focus=true. There should are type hints for them in rapidfuzz.

from levenshtein.

atomflunder avatar atomflunder commented on June 16, 2024

I am not quite sure either what the cause of the error might be. Maybe a stupid idea, but does the action maybe download an older version of the packages from pypi? If not, I think we could manually add the stubs to the __init__.pyi file, like the other functions already in there to please Mypy, however that does sound like a headache to maintain.

Like:

from typing Sequence, Hashable, Callable

...


def distance(
    s1: Sequence[Hashable],
    s2: Sequence[Hashable],
    processor: Optional[Callable] = None,
    score_cutoff: Optional[float] = None,
) -> int: ...
def ratio(
    s1: Sequence[Hashable],
    s2: Sequence[Hashable],
    processor: Optional[Callable] = None,
    score_cutoff: Optional[float] = None,
) -> float: ...
def hamming(
    s1: Sequence[Hashable],
    s2: Sequence[Hashable],
    processor: Optional[Callable] = None,
    score_cutoff: Optional[float] = None,
) -> int: ...
def jaro(
    s1: Sequence[Hashable],
    s2: Sequence[Hashable],
    processor: Optional[Callable] = None,
    score_cutoff: Optional[float] = None,
) -> float: ...
def jaro_winkler(
    s1: Sequence[Hashable],
    s2: Sequence[Hashable],
    processor: Optional[Callable] = None,
    score_cutoff: Optional[float] = None,
) -> float: ...

Again, probably not the ideal way to go about things. In any case, thanks for responding so quickly.

from levenshtein.

maxbachmann avatar maxbachmann commented on June 16, 2024

I am not quite sure either what the cause of the error might be. Maybe a stupid idea, but does the action maybe download an older version of the packages from pypi?

no this appears to be the newest version

If not, I think we could manually add the stubs to the init.pyi file, like the other functions already in there to please Mypy, however that does sound like a headache to maintain.

Since those are not going to change a lot I guess this would be fine. Do you want to open a PR with these stubs?

from levenshtein.

atomflunder avatar atomflunder commented on June 16, 2024

Yes, I can do that.

from levenshtein.

Related Issues (20)

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.