Skip to content

style: format code with Autopep8, isort and Ruff Formatter#20

Open
deepsource-autofix[bot] wants to merge 1 commit into
mainfrom
deepsource-transform-3fb467e5
Open

style: format code with Autopep8, isort and Ruff Formatter#20
deepsource-autofix[bot] wants to merge 1 commit into
mainfrom
deepsource-transform-3fb467e5

Conversation

@deepsource-autofix

@deepsource-autofix deepsource-autofix Bot commented Jan 9, 2025

Copy link
Copy Markdown
Contributor

This commit fixes the style issues introduced in 0cc27cf according to the output
from Autopep8, isort and Ruff Formatter.

Details: None

Summary by Sourcery

Chores:

  • Apply automatic code formatting to improve code style consistency.

This commit fixes the style issues introduced in 0cc27cf according to the output
from Autopep8, isort and Ruff Formatter.

Details: None
@sourcery-ai

sourcery-ai Bot commented Jan 9, 2025

Copy link
Copy Markdown

Reviewer's Guide by Sourcery

This pull request improves code formatting using Autopep8, isort, and Ruff Formatter across multiple files. No logical changes were introduced.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Formatting of data handling logic improved.
  • Simplified DataFrame column initialization.
  • Removed unnecessary parentheses in data insertion and update methods.
  • Streamlined MongoDB interaction code.
  • Simplified file path handling in load and save methods.
src/everyai/data_loader/everyai_dataset.py
Code style improvements in classifier modules.
  • Removed extra parentheses from train_test_split calls.
  • Simplified dictionary creation in dataset mapping.
  • Improved code readability in sentiment analysis.
  • Streamlined class initialization.
  • Simplified prediction method and result path handling.
src/everyai/classifier/classify.py
src/everyai/classifier/fusion_classifer.py
src/everyai/classifier/huggingface_classifier.py
src/everyai/classifier/multi_feature_model/fusionBert.py
src/everyai/classifier/sklearn_classifier.py
Data loading logic formatting improved.
  • Simplified file existence check.
  • Removed unnecessary logging message.
  • Improved data loading and conversion logic.
src/everyai/data_loader/data_load.py
Test code formatting updated.
  • Added import statement.
  • Improved tokenizer function formatting.
src/everyai/test.py
Main application and generator code formatting enhanced.
  • Removed unused import.
  • Simplified generator loop.
  • Removed unnecessary parentheses in API call.
src/everyai/main.py
src/everyai/generator/generate.py
Utility functions and MongoDB connection formatting improved.
  • Removed trailing whitespace.
  • Added type hint.
  • Improved function definition formatting.
src/everyai/utils/load_args.py
src/everyai/data_loader/mongo_connection.py
Topic modeling code formatting updated.
  • Added import statement.
  • Improved function definition formatting.
src/everyai/topic/my_bertopic.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We have skipped reviewing this pull request. It seems to have been created by a bot (hey, deepsource-autofix[bot]!). We assume it knows what it's doing!

@deepsource-io

deepsource-io Bot commented Jan 9, 2025

Copy link
Copy Markdown
Contributor

Here's the code health analysis summary for commits 0cc27cf..5c1cf65. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Python LogoPython✅ Success
🎯 18 occurences resolved
View Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

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.

0 participants