Skip to content

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

Open
deepsource-autofix[bot] wants to merge 1 commit into
mainfrom
deepsource-transform-613a2044
Open

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

Conversation

@deepsource-autofix

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

Copy link
Copy Markdown
Contributor

This commit fixes the style issues introduced in 666fa4c 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 666fa4c according to the output
from Autopep8, isort and Ruff Formatter.

Details: None
@sourcery-ai

sourcery-ai Bot commented Jan 16, 2025

Copy link
Copy Markdown

Reviewer's Guide by Sourcery

This pull request applies automatic code formatting using Autopep8, isort, and Ruff Formatter to the codebase. This improves code readability and consistency by addressing style issues introduced in a previous commit (666fa4c). The changes primarily involve whitespace adjustments, line breaks, and import order.

Class diagram showing the main classes affected by formatting changes

classDiagram
    class EveryAIDataset {
      +DataFrame datas
      +list ai_list
      +str data_name
      +__init__(datas, ai_list, data_name)
      +insert_ai_response(question, ai_name, ai_response)
      +insert_human_response(question, human_response)
      +record_exist(question, label, file_type)
      +read(path_or_database, file_format)
      +save(path_or_database, file_format)
    }

    class FeatureFusionBertClassfier {
      +__init__(feature_num, proj_dim, bert_input_dim, num_labels)
      +forward(features, input_ids)
    }

    class HuggingfaceClassifer {
      +str model_name
      +__init__(config)
      +train()
      +test()
    }

    note for EveryAIDataset "Code formatting changes applied"
    note for FeatureFusionBertClassfier "Line breaks and indentation fixed"
    note for HuggingfaceClassifer "Whitespace and line wrapping improved"
Loading

File-Level Changes

Change Details Files
Formatting of EveryAI Dataset class
  • Simplified DataFrame column definitions
  • Removed unnecessary parentheses in conditional checks and assignments
  • Standardized method definitions for MongoDB interaction and file operations
src/everyai/data_loader/everyai_dataset.py
Formatting of FusionBert class
  • Removed unnecessary parentheses and whitespace in method calls and definitions
  • Simplified sentiment analysis logic
src/everyai/classifier/multi_feature_model/fusionBert.py
Formatting of data loading utilities
  • Removed unnecessary parentheses in conditional checks
  • Simplified data loading logic for different file formats
src/everyai/data_loader/data_load.py
Formatting of Hugging Face classifier
  • Removed unnecessary parentheses and whitespace in class and method definitions
  • Simplified dataset creation and tokenization
src/everyai/classifier/huggingface_classifier.py
Formatting of main application script
  • Removed unnecessary parentheses in function calls
  • Simplified generator and classifier instantiation
src/everyai/main.py
Formatting of explanation module
  • Improved error logging messages
src/everyai/explanation/explain.py
Formatting of test script
  • Removed unnecessary import
  • Simplified data processing logic
src/everyai/test.py
Formatting of generator module
  • Simplified error handling
src/everyai/generator/generate.py
Formatting of OpenAI generator
  • Removed unnecessary parentheses in function calls
src/everyai/generator/openai_generate.py
Formatting of utility functions
  • Removed trailing whitespace
src/everyai/utils/load_args.py
Formatting of Hugging Face generator
  • Reordered imports
src/everyai/generator/huggingface_generate.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 16, 2025

Copy link
Copy Markdown
Contributor

Here's the code health analysis summary for commits 666fa4c..d4ffe08. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Python LogoPython❌ Failure
❗ 1 occurence introduced
🎯 12 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