airbytehq / PyAirbyte

PyAirbyte brings the power of Airbyte to every Python developer.
https://docs.airbyte.com/pyairbyte
Other
235 stars 42 forks source link

Chore: Remove dead code using vulture (do not merge) #533

Open aaronsteers opened 1 week ago

aaronsteers commented 1 week ago

Sample output:

$ poetry run vulture airbyte
airbyte/_connector_base.py:48: unused variable 'MAX_LOG_LINES' (60% confidence)
airbyte/_connector_base.py:267: unused property '_yaml_spec' (60% confidence)
airbyte/_message_iterators.py:78: unused method 'read' (60% confidence)
airbyte/_message_iterators.py:141: unused method 'from_str_iterable' (60% confidence)
airbyte/_message_iterators.py:156: unused method 'from_stdin' (60% confidence)
airbyte/_message_iterators.py:161: unused method 'from_files' (60% confidence)
airbyte/_util/api_duck_types.py:16: unused variable 'content_type' (60% confidence)
airbyte/_util/api_util.py:31: unused variable 'JOB_WAIT_TIMEOUT_SECS_DEFAULT' (60% confidence)
airbyte/_util/api_util.py:473: unused function 'get_connection_by_name' (60% confidence)
airbyte/_util/connector_info.py:28: unused variable 'executor_type' (60% confidence)
airbyte/_util/document_rendering.py:28: unused class 'CustomRenderingInstructions' (60% confidence)
airbyte/_util/document_rendering.py:33: unused variable 'frontmatter_properties' (60% confidence)
airbyte/_util/name_normalizers.py:27: unused method 'normalize_set' (60% confidence)
airbyte/_util/name_normalizers.py:37: unused method 'check_matched' (60% confidence)
airbyte/_util/name_normalizers.py:42: unused method 'check_normalized' (60% confidence)
airbyte/_util/telemetry.py:82: unused variable 'UNKNOWN' (60% confidence)
airbyte/_writers/base.py:49: unused method '_write_airbyte_io_stream' (60% confidence)
airbyte/_writers/file_writers.py:265: unused method 'get_active_batch' (60% confidence)
airbyte/_writers/file_writers.py:275: unused method 'get_finalized_batches' (60% confidence)
airbyte/caches/_catalog_backend.py:97: unused method 'get_source_catalog_provider' (60% confidence)
airbyte/caches/_catalog_backend.py:257: unused method 'get_source_catalog_provider' (60% confidence)
airbyte/caches/_state_backend.py:62: unused variable 'last_updated' (60% confidence)
airbyte/caches/_state_backend.py:92: unused variable 'last_updated' (60% confidence)
airbyte/caches/_state_backend_base.py:29: unused attribute '_state_artifacts' (60% confidence)
airbyte/caches/_state_backend_base.py:55: unused method '_initialize_backend' (60% confidence)
airbyte/caches/base.py:111: unused method 'execute_sql' (60% confidence)
airbyte/caches/generic.py:12: unused class 'GenericSQLCacheConfig' (60% confidence)
airbyte/caches/snowflake.py:34: unused variable 'dedupe_mode' (60% confidence)
airbyte/cloud/_destination_util.py:150: unused function 'create_motherduck_cache' (60% confidence)
airbyte/cloud/connections.py:163: unused method 'get_sync_result' (60% confidence)
airbyte/cloud/constants.py:22: unused variable 'READABLE_DESTINATION_TYPES' (60% confidence)
airbyte/cloud/experimental.py:48: unused variable 'deploy_connection' (60% confidence)
airbyte/cloud/experimental.py:49: unused variable 'deploy_source' (60% confidence)
airbyte/cloud/experimental.py:50: unused variable 'deploy_cache_as_destination' (60% confidence)
airbyte/cloud/experimental.py:51: unused variable 'permanently_delete_connection' (60% confidence)
airbyte/cloud/experimental.py:52: unused variable 'permanently_delete_source' (60% confidence)
airbyte/cloud/experimental.py:53: unused variable 'permanently_delete_destination' (60% confidence)
airbyte/cloud/experimental.py:60: unused variable 'permanently_delete' (60% confidence)
airbyte/cloud/sync_results.py:139: unused variable 'table_name_prefix' (60% confidence)
airbyte/cloud/sync_results.py:140: unused variable 'table_name_suffix' (60% confidence)
airbyte/cloud/sync_results.py:145: unused property 'job_url' (60% confidence)
airbyte/cloud/sync_results.py:173: unused method 'is_job_complete' (60% confidence)
airbyte/cloud/sync_results.py:198: unused property 'records_synced' (60% confidence)
airbyte/cloud/sync_results.py:308: unused method 'get_sql_database_name' (60% confidence)
airbyte/cloud/sync_results.py:313: unused method 'get_sql_schema_name' (60% confidence)
airbyte/cloud/workspaces.py:92: unused attribute '_deployed_api_root' (60% confidence)
airbyte/cloud/workspaces.py:93: unused attribute '_deployed_workspace_id' (60% confidence)
airbyte/cloud/workspaces.py:147: unused attribute '_deployed_api_root' (60% confidence)
airbyte/cloud/workspaces.py:148: unused attribute '_deployed_workspace_id' (60% confidence)
airbyte/cloud/workspaces.py:259: unused attribute '_deployed_api_root' (60% confidence)
airbyte/cloud/workspaces.py:260: unused attribute '_deployed_workspace_id' (60% confidence)
airbyte/cloud/workspaces.py:263: unused attribute '_deployed_api_root' (60% confidence)
airbyte/cloud/workspaces.py:264: unused attribute '_deployed_workspace_id' (60% confidence)
airbyte/cloud/workspaces.py:335: unused method 'get_sync_result' (60% confidence)
airbyte/datasets/_base.py:33: unused method 'to_pandas' (60% confidence)
airbyte/datasets/_base.py:43: unused method 'to_arrow' (60% confidence)
airbyte/datasets/_sql.py:103: unused method 'to_pandas' (60% confidence)
airbyte/datasets/_sql.py:106: unused method 'to_arrow' (60% confidence)
airbyte/datasets/_sql.py:113: unused method 'with_filter' (60% confidence)
airbyte/datasets/_sql.py:172: unused method 'to_pandas' (60% confidence)
airbyte/datasets/_sql.py:177: unused method 'to_arrow' (60% confidence)
airbyte/datasets/_sql.py:197: unused method 'to_sql_table' (60% confidence)
airbyte/documents.py:22: unused variable 'MAX_SINGLE_LINE_LENGTH' (60% confidence)
airbyte/documents.py:23: unused variable 'AIRBYTE_DOCUMENT_RENDERING' (60% confidence)
airbyte/documents.py:24: unused variable 'TITLE_PROPERTY' (60% confidence)
airbyte/documents.py:25: unused variable 'CONTENT_PROPS' (60% confidence)
airbyte/documents.py:26: unused variable 'METADATA_PROPERTIES' (60% confidence)
airbyte/documents.py:41: unused variable 'id' (60% confidence)
airbyte/documents.py:44: unused variable 'last_modified' (60% confidence)
airbyte/documents.py:50: unused property 'page_content' (60% confidence)
airbyte/exceptions.py:187: unused variable 'input_value' (60% confidence)
airbyte/exceptions.py:215: unused variable 'raw_name' (60% confidence)
airbyte/exceptions.py:216: unused variable 'normalization_result' (60% confidence)
airbyte/exceptions.py:226: unused class 'PyAirbyteCacheTableValidationError' (60% confidence)
airbyte/exceptions.py:230: unused variable 'violation' (60% confidence)
airbyte/exceptions.py:247: unused variable 'run_args' (60% confidence)
airbyte/exceptions.py:325: unused class 'AirbyteConnectorReadError' (60% confidence)
airbyte/exceptions.py:337: unused class 'AirbyteConnectorDiscoverFailedError' (60% confidence)
airbyte/exceptions.py:437: unused variable 'job_status' (60% confidence)
airbyte/exceptions.py:456: unused property 'job_url' (60% confidence)
airbyte/exceptions.py:474: unused variable 'timeout' (60% confidence)
airbyte/exceptions.py:485: unused variable 'resource_type' (60% confidence)
airbyte/exceptions.py:486: unused variable 'resource_name_or_id' (60% confidence)
airbyte/exceptions.py:493: unused variable 'resource_type' (60% confidence)
airbyte/exceptions.py:494: unused variable 'resource_name_or_id' (60% confidence)
airbyte/progress.py:204: unused attribute 'total_records_finalized' (60% confidence)
airbyte/progress.py:664: unused property 'elapsed_time_string' (60% confidence)
airbyte/progress.py:943: unused property 'total_destination_records_confirmed' (60% confidence)
airbyte/records.py:127: unused attribute 'normalized_keys' (60% confidence)
airbyte/results.py:84: unused property 'processed_records' (60% confidence)
airbyte/results.py:126: unused attribute '_source_data' (60% confidence)
airbyte/results.py:131: unused property 'processed_records' (60% confidence)
airbyte/secrets/base.py:64: unused method 'is_empty' (60% confidence)
airbyte/secrets/base.py:68: unused method 'is_json' (60% confidence)
airbyte/secrets/base.py:117: unused variable 'source_type' (100% confidence)
airbyte/secrets/base.py:240: unused function 'write_to_file' (60% confidence)
airbyte/secrets/google_gsm.py:172: unused method 'get_secret_handle' (60% confidence)
airbyte/secrets/google_gsm.py:264: unused method 'fetch_connector_secret' (60% confidence)
airbyte/sources/base.py:90: unused attribute '_deployed_api_root' (60% confidence)
airbyte/sources/base.py:91: unused attribute '_deployed_workspace_id' (60% confidence)
airbyte/sources/base.py:94: unused method 'set_streams' (60% confidence)
airbyte/sources/base.py:299: unused property '_yaml_spec' (60% confidence)
airbyte/sources/base.py:462: unused function '_with_logging' (60% confidence)
airbyte/sources/base.py:497: unused method 'get_documents' (60% confidence)
airbyte/sources/base.py:609: unused method 'read' (60% confidence)
airbyte/sources/util.py:21: unused function 'get_connector' (60% confidence)

Summary by CodeRabbit

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
pyairbyte-api-docs ❌ Failed (Inspect) Nov 16, 2024 6:01am
coderabbitai[bot] commented 1 week ago
📝 Walkthrough ## Walkthrough The recent changes to the `pyproject.toml` file involve the addition of a new development dependency, `vulture`, specified with the version constraint `^2.13`. This update enhances the development environment for code quality improvements by identifying unused code. The existing dependencies and overall structure of the file remain unchanged, with no other modifications or removals. ## Changes | File | Change Summary | |---------------------|------------------------------------------------------| | pyproject.toml | Added dependency `vulture = "^2.13"` under `[tool.poetry.group.dev.dependencies]` | ## Sequence Diagram(s) ```mermaid sequenceDiagram participant Developer participant Development Environment participant Vulture Developer->>Development Environment: Update pyproject.toml Development Environment->>Vulture: Install vulture dependency Vulture-->>Development Environment: Ready for use Development Environment-->>Developer: Code quality checks available ```

[!WARNING]

Rate limit exceeded

@aaronsteers has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 9 minutes and 4 seconds before requesting another review.

⌛ How to resolve this issue? After the wait time has elapsed, a review can be triggered using the `@coderabbitai review` command as a PR comment. Alternatively, push new commits to this PR. We recommend that you space out your commits to avoid hitting the rate limit.
🚦 How do rate limits work? CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our [FAQ](https://docs.coderabbit.ai/faq) for further information.
📥 Commits Reviewing files that changed from the base of the PR and between 186d0c53b79b42b3023c95a87c9ab35ab8183683 and 84a0c2d7c47b8dd221e8306bea910db9c38a44f0.

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 - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
🪧 Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): > ‼️ **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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.` - `@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 using 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. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` or `@coderabbitai title` anywhere in the PR title to generate the title automatically. ### 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](https://docs.coderabbit.ai/guides/configure-coderabbit) 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](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.