Skip to content

pyobis.occurrences.search().exectute() ignores invalid kwargs #207

@7yl4r

Description

@7yl4r

I mis-remembered the kwarg name for limiting the number of records and found the code passes without applying the limit.

import pyobis

query = pyobis.occurrences.search(
    taxonid=233015, 
    limit=10,  # NOTE: `limit` mistakenly used instead of `size`
)

I was expecting 10 records, but 41k were downloaded.
Now that I know my mistake I expect the code to throw TypeError: ... got an unexpected keyword argument.

The silent eating of kwargs could leads to confusion.

I suspect other methods have this issue as well.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions