[PR #290] Accept Sequence instead of List #485

Open
opened 2026-10-31 21:15:26 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/openai/CLIP/pull/290
Author: @jangop
Created: 9/14/2022
Status: 🔄 Open

Base: main ← Head: patch-1


📝 Commits (1)

  • b118307 Accept Sequence instead of List

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 clip/clip.py (+2 -2)

📄 Description

This is minor, I know. tokenize simply iterates over texts, so in addition to list, tuple is fine. The intended type hint for this is Sequence.

I am not sure which version of Python this project targets, but judging from the other type hints in this file, I am going to assume <3.9. Otherwise, I would suggest importing Sequence from collections.abc instead of typing.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/openai/CLIP/pull/290 **Author:** [@jangop](https://github.com/jangop) **Created:** 9/14/2022 **Status:** 🔄 Open **Base:** `main` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`b118307`](https://github.com/openai/CLIP/commit/b118307608caa62a88edb658d9bbdb865ebc0f50) Accept `Sequence` instead of `List` ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `clip/clip.py` (+2 -2) </details> ### 📄 Description This is minor, I know. `tokenize` simply iterates over `texts`, so in addition to `list`, `tuple` is fine. The intended type hint for this is `Sequence`. I am not sure which version of Python this project targets, but judging from the other type hints in this file, I am going to assume `<3.9`. Otherwise, I would suggest importing `Sequence` from `collections.abc` instead of `typing`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openai/CLIP#485
No description provided.