Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fixing Pyright Errors #1267

Merged
merged 2 commits into from
Dec 18, 2024
Merged

Fixing Pyright Errors #1267

merged 2 commits into from
Dec 18, 2024

Conversation

ivanleomk
Copy link
Collaborator

@ivanleomk ivanleomk commented Dec 18, 2024

Important

Fixes Pyright errors by removing unnecessary type ignores and improving code formatting in multiple files.

  • Imports:
    • Removed # type: ignore from pydantic imports in batch.py, citation.py, iterable.py, maybe.py, validators.py, and multimodal.py.
  • Formatting:
    • Fixed trailing commas in dictionary definitions in batch.py and multimodal.py.
    • Reformatted multi-line dictionary definitions in iterable.py and multimodal.py for readability.

This description was created by Ellipsis for 953910c. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to b07286c in 27 seconds

More details
  • Looked at 169 lines of code in 6 files
  • Skipped 0 files when reviewing.
  • Skipped posting 7 drafted comments based on config settings.
1. instructor/batch.py:3
  • Draft comment:
    The removal of # type: ignore from the Pydantic import suggests that the type checker should now handle these imports correctly. Ensure that the rest of the codebase is compatible with this change.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The PR removes the # type: ignore comment from the Pydantic import statements. This is a good change as it indicates that the type checker should now be able to handle these imports correctly. However, it's important to ensure that the rest of the codebase is compatible with the type checker and that no new type errors are introduced.
2. instructor/batch.py:142
  • Draft comment:
    The addition of trailing commas and adjustment of indentation in dictionary literals improves readability and consistency. Ensure this style is consistently applied throughout the codebase.
  • Reason this comment was not posted:
    Confidence changes required: 20%
    The PR includes changes to the formatting of dictionary literals, specifically adding trailing commas and adjusting indentation. This is a stylistic change that improves readability and consistency, especially in multi-line dictionary definitions.
3. instructor/batch.py:160
  • Draft comment:
    The addition of trailing commas and adjustment of indentation in dictionary literals improves readability and consistency. Ensure this style is consistently applied throughout the codebase.
  • Reason this comment was not posted:
    Confidence changes required: 20%
    The PR includes changes to the formatting of dictionary literals, specifically adding trailing commas and adjusting indentation. This is a stylistic change that improves readability and consistency, especially in multi-line dictionary definitions.
4. instructor/dsl/iterable.py:115
  • Draft comment:
    The addition of trailing commas and adjustment of indentation in dictionary literals improves readability and consistency. Ensure this style is consistently applied throughout the codebase.
  • Reason this comment was not posted:
    Confidence changes required: 20%
    The PR includes changes to the formatting of dictionary literals, specifically adding trailing commas and adjusting indentation. This is a stylistic change that improves readability and consistency, especially in multi-line dictionary definitions.
5. instructor/dsl/iterable.py:156
  • Draft comment:
    The addition of trailing commas and adjustment of indentation in dictionary literals improves readability and consistency. Ensure this style is consistently applied throughout the codebase.
  • Reason this comment was not posted:
    Confidence changes required: 20%
    The PR includes changes to the formatting of dictionary literals, specifically adding trailing commas and adjusting indentation. This is a stylistic change that improves readability and consistency, especially in multi-line dictionary definitions.
6. instructor/multimodal.py:343
  • Draft comment:
    The addition of trailing commas and adjustment of indentation in dictionary literals improves readability and consistency. Ensure this style is consistently applied throughout the codebase.
  • Reason this comment was not posted:
    Confidence changes required: 20%
    The PR includes changes to the formatting of dictionary literals, specifically adding trailing commas and adjusting indentation. This is a stylistic change that improves readability and consistency, especially in multi-line dictionary definitions.
7. instructor/multimodal.py:367
  • Draft comment:
    The addition of trailing commas and adjustment of indentation in dictionary literals improves readability and consistency. Ensure this style is consistently applied throughout the codebase.
  • Reason this comment was not posted:
    Confidence changes required: 20%
    The PR includes changes to the formatting of dictionary literals, specifically adding trailing commas and adjusting indentation. This is a stylistic change that improves readability and consistency, especially in multi-line dictionary definitions.

Workflow ID: wflow_Zk0hw0vFGRb4I0p2


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@github-actions github-actions bot added bug Something isn't working enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files. labels Dec 18, 2024
Copy link

cloudflare-workers-and-pages bot commented Dec 18, 2024

Deploying instructor-py with  Cloudflare Pages  Cloudflare Pages

Latest commit: 953910c
Status: ✅  Deploy successful!
Preview URL: https://a31bdf98.instructor-py.pages.dev
Branch Preview URL: https://fix-pyright-ignore-errors.instructor-py.pages.dev

View logs

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on 953910c in 13 seconds

More details
  • Looked at 21 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. instructor/multimodal.py:362
  • Draft comment:
    The # type: ignore comments are unnecessary here. Consider refactoring the code to ensure type safety without ignoring type checks.
  • Reason this comment was not posted:
    Confidence changes required: 80%
    The # type: ignore comments are unnecessary and should be removed. The code should be refactored to ensure type safety without ignoring type checks.
2. instructor/multimodal.py:362
  • Draft comment:
    If the # type: ignore comments are necessary, please add a comment explaining why they are needed. Otherwise, consider removing them.
  • Reason this comment was not posted:
    Confidence changes required: 80%
    The # type: ignore comments in the convert_messages function should be removed if they are not necessary. If they are necessary, a comment explaining why they are needed should be added.

Workflow ID: wflow_Cb6XnUbkXlTOO2PK


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@ivanleomk ivanleomk merged commit 46ac59c into main Dec 18, 2024
14 of 15 checks passed
@ivanleomk ivanleomk deleted the fix-pyright-ignore-errors branch December 18, 2024 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant