Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

mypy error: "COGReader" gets multiple values for keyword argument "tms" #6

Open
vincentsarago opened this issue Jul 23, 2020 · 0 comments

Comments

@vincentsarago
Copy link
Member

The new version of COGReader (inherited from rio_tiler.io.cogeo.COGReader) gives a mypy error when used in a function.

This:

def test(asset, tms: morecantile.TileMatrixSet = default_tms):
    with COGReader(asset, tms=tms) as cog:
        return cog.info

will return "COGReader" gets multiple values for keyword argument "tms"

Users need to add # type: ignore to silent this error

def test(asset, tms: morecantile.TileMatrixSet = default_tms):
    with COGReader(asset, tms=tms) as cog:    # type: ignore
        return cog.info

ref: #5 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant