Skip to content

Chore: Remove Py39 styling#341

Merged
Aaron ("AJ") Steers (aaronsteers) merged 4 commits into
mainfrom
aj/chore/remove-py39-style
Aug 20, 2024
Merged

Chore: Remove Py39 styling#341
Aaron ("AJ") Steers (aaronsteers) merged 4 commits into
mainfrom
aj/chore/remove-py39-style

Conversation

@aaronsteers

@aaronsteers Aaron ("AJ") Steers (aaronsteers) commented Aug 19, 2024

Copy link
Copy Markdown
Member

The only manual changes are in pyproject.toml. All else is auto-fixed by Ruff.

Summary by CodeRabbit

  • New Features

    • Updated type hinting across various modules to align with modern Python standards (e.g., using str | None instead of Optional[str]).
    • Enhanced type checking and readability by introducing union types using the | operator.
  • Bug Fixes

    • No bug fixes were introduced in this release.
  • Chores

    • Updated the Python target version in the configuration to support Python 3.10 features.
    • Streamlined import statements by removing dependencies on typing_extensions.
  • Documentation

    • No changes to documentation were made in this release.

@coderabbitai

coderabbitai Bot commented Aug 19, 2024

Copy link
Copy Markdown
Contributor
Walkthrough

Walkthrough

The recent changes primarily focus on updating type hinting throughout the Airbyte codebase, moving from typing_extensions to standard library imports in typing, and adopting modern union syntax introduced in Python 3.10. These modifications enhance code clarity and maintainability without altering existing functionality. The updates reflect a commitment to keeping the codebase aligned with contemporary Python standards, improving readability and potentially increasing compatibility with future versions.

Changes

Files Change Summary
airbyte/_batch_handles.py, airbyte/_executors/python.py, airbyte/_message_iterators.py, airbyte/_processors/sql/bigquery.py, airbyte/_processors/sql/duckdb.py, airbyte/_processors/sql/postgres.py, airbyte/_util/document_rendering.py, airbyte/caches/base.py, airbyte/cloud/workspaces.py, airbyte/progress.py, airbyte/sources/base.py, pyproject.toml Updated type hints to use standard library imports from typing instead of typing_extensions, and transitioned to modern union syntax (e.g., `str

Sequence Diagram(s)

sequenceDiagram
    participant A as User
    participant B as Application
    participant C as Database

    A->>B: Request operation
    B->>C: Process request
    C-->>B: Return result
    B-->>A: Send response
Loading

Would you like to see more details on any specific change?


Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 80c8cd1 and f9d764b.

Files selected for processing (18)
  • airbyte/_batch_handles.py (1 hunks)
  • airbyte/_connector_base.py (1 hunks)
  • airbyte/_executors/python.py (1 hunks)
  • airbyte/_executors/util.py (1 hunks)
  • airbyte/_future_cdk/sql_processor.py (2 hunks)
  • airbyte/_message_iterators.py (2 hunks)
  • airbyte/_processors/sql/bigquery.py (2 hunks)
  • airbyte/_processors/sql/duckdb.py (2 hunks)
  • airbyte/_processors/sql/postgres.py (2 hunks)
  • airbyte/_util/document_rendering.py (3 hunks)
  • airbyte/caches/base.py (2 hunks)
  • airbyte/cloud/workspaces.py (1 hunks)
  • airbyte/datasets/_sql.py (1 hunks)
  • airbyte/destinations/base.py (2 hunks)
  • airbyte/documents.py (2 hunks)
  • airbyte/progress.py (1 hunks)
  • airbyte/sources/base.py (1 hunks)
  • pyproject.toml (2 hunks)
Files skipped from review due to trivial changes (14)
  • airbyte/_batch_handles.py
  • airbyte/_connector_base.py
  • airbyte/_executors/python.py
  • airbyte/_future_cdk/sql_processor.py
  • airbyte/_message_iterators.py
  • airbyte/_processors/sql/bigquery.py
  • airbyte/_processors/sql/duckdb.py
  • airbyte/_processors/sql/postgres.py
  • airbyte/_util/document_rendering.py
  • airbyte/caches/base.py
  • airbyte/datasets/_sql.py
  • airbyte/destinations/base.py
  • airbyte/progress.py
  • airbyte/sources/base.py
Additional comments not posted (5)
airbyte/documents.py (2)

41-41: Modernize type hint for id.

The type hint for id has been updated to use the modern union syntax. This improves readability and aligns with Python 3.10 standards. Nice update!


44-44: Modernize type hint for last_modified.

The type hint for last_modified has been updated to use the modern union syntax. This is consistent with Python 3.10 standards and enhances readability. Great work!

airbyte/_executors/util.py (1)

198-204: Modernize type checking for source_manifest.

The isinstance checks have been updated to use the modern union syntax, which enhances readability and aligns with Python 3.10 standards. Well done!

pyproject.toml (1)

107-107: Update Python target version to 3.10.

The target-version has been updated to "py310", aligning with the move to Python 3.10 and supporting modern Python features. This is a good step forward!

airbyte/cloud/workspaces.py (1)

106-106: Modernize type checking for source.

The isinstance check has been updated to use the modern union syntax, which enhances readability and aligns with Python 3.10 standards. Nice update!


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant