Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates several equality comparisons to use the identity operator ("is") for built‐in types in preparation for a broader ruff check. The changes affect comparisons in the method signature utilities and data type utilities to align with modern code style requirements.
- Updated type checks in clarifai/runners/utils/method_signatures.py (e.g. tuple, list comparisons).
- Modified equality comparisons in clarifai/runners/utils/data_types.py (e.g. comparing python_type with self.class, str, Text, Image, etc.).
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| clarifai/runners/utils/method_signatures.py | Replaced some equality (==) checks with identity (is) comparisons for type checks. |
| clarifai/runners/utils/data_types.py | Updated equality comparisons to use identity (is) for built-in type checks. |
Minimum allowed line rate is |
wemoveon2
approved these changes
May 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In prep for
ruff checkacross the repo, it flags some comparisons that should beis. Making a PR for just that first to see if it makes sense.