Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

.filter(tag=...) can be a list of strings #7

Open
ChrisHills463 opened this issue Apr 15, 2024 · 0 comments
Open

.filter(tag=...) can be a list of strings #7

ChrisHills463 opened this issue Apr 15, 2024 · 0 comments

Comments

@ChrisHills463
Copy link

The tag argument to .filter() can be a list of strings as well as a string.

Example:-

import pynetbox

nb = pynetbox.api(
    NETBOX_URL,
    token=NETBOX_TOKEN
)

# Argument of type "list[str]" cannot be assigned to parameter "tag" of type "str | None" in function "filter"
prefixes = nb.ipam.prefixes.filter(tag=["apple", "banana", "cherry"])
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant