Skip to content

populate_rango.py cat_data["pages"] #52

@jujes

Description

@jujes

Hi, how fix it?

Expected 'collections.Iterable', got 'Union[List[Dict[str, Union[str, int]]], int]' instead less...

This inspection detects type errors in function call expressions. Due to dynamic dispatch and duck typing, this is possible in a limited but useful number of cases. Types of function parameters can be specified in docstrings or in Python 3 function annotations.

    for cat, cat_data in cats.items():
        # c = add_cat(cat)
        c = add_cat(cat, cat_data["views"], cat_data["likes"])
        for p in cat_data["pages"]:
            add_page(c, p["title"], p["url"], p["views"])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions