Skip to content

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

Open
deepsource-autofix[bot] wants to merge 1 commit into
mainfrom
deepsource-transform-0efa95d0
Open

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

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 ad10446 according to the output
from Autopep8, isort and Ruff Formatter.

Details: None

Summary by Sourcery

Chores:

  • Apply automatic code formatting to improve code readability and maintainability.

This commit fixes the style issues introduced in ad10446 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 applies automatic code formatting using Autopep8, isort, and Ruff Formatter to resolve style inconsistencies introduced in a previous commit (ad10446). The changes primarily involve adjusting whitespace, line breaks, and import order to adhere to the defined style guidelines.

Class diagram showing the structure of the feature fusion classifier

classDiagram
    class FeatureFusionBertTokenizer {
        -nlp
        -all_tags
        -sentiment_analyzer
        +analyze_word_level_sentiment(text: str, max_length: int) torch.tensor
        +pos_feature(text: str) torch.tensor
        +batch_encode_plus(batch_text: list[str])
    }
    class FeatureFusionBertClassfier {
        -feature_num: int
        -proj_dim: int
        -bert_input_dim: int
        -num_labels: int
        +forward(features: list, input_ids)
    }
    class MultiFeatureFusion {
        -feature_num: int
        -proj_dim: int
        -projections: list
        +forward(features: list[torch.tensor])
    }
    FeatureFusionBertClassfier --> MultiFeatureFusion
    note for FeatureFusionBertTokenizer "Handles text tokenization and feature extraction"
    note for FeatureFusionBertClassfier "Main classifier combining BERT with feature fusion"
    note for MultiFeatureFusion "Handles fusion of multiple features"
Loading

File-Level Changes

Change Details Files
Formatted code for improved style consistency.
  • Removed unnecessary blank lines and whitespace.
  • Reformatted dictionary literals for better readability.
  • Simplified list comprehensions and function calls.
  • Standardized the use of blank lines around code blocks.
src/everyai/classifier/pytorch_classier.py
Applied formatting changes to enhance code readability.
  • Improved the formatting of function arguments and parameters.
  • Standardized indentation and spacing within functions.
  • Removed redundant parentheses in expressions.
  • Reformatted multi-line statements for clarity.
src/everyai/classifier/multi_feature_model/fusionBert.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 ad10446..565193f. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Python LogoPython❌ Failure
❗ 2 occurences introduced
🎯 6 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