Skip to content

Conversation

@5hojib
Copy link
Member

@5hojib 5hojib commented Jan 19, 2025

Summary by Sourcery

CI:

  • Add workflow dispatch trigger.

Signed-off-by: 5hojib <yesiamshojib@gmail.com>
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jan 19, 2025

Reviewer's Guide by Sourcery

This pull request focuses on improving code readability and maintainability by standardizing string formatting and adding a workflow dispatch trigger. It also includes a minor fix in the sqlite storage.

Class diagram showing the modified compiler and storage components

classDiagram
    class Compiler {
      +get_type_hint(type: str) -> str
      +sort_args(args: list)
      +start()
    }
    note for Compiler "Modified string formatting in methods"

    class SQLiteStorage {
      +update_usernames(usernames: list[tuple[int, str]]) -> None
    }
    note for SQLiteStorage "Fixed SQL query formatting"

    class DocsCompiler {
      +build(path: str, level: int) -> None
    }
    note for DocsCompiler "Updated string formatting"
Loading

File-Level Changes

Change Details Files
Standardize string formatting using f-strings.
  • Replaced single quotes with double quotes in f-strings for consistency.
  • Removed unnecessary spaces within f-strings.
compiler/api/compiler.py
Minor change in the documentation generator.
  • Replaced single quotes with double quotes in f-strings for consistency.
compiler/docs/compiler.py
Fix SQL query in sqlite storage.
  • Added a space in the SQL query for better readability.
pyrogram/storage/sqlite_storage.py
Add workflow dispatch trigger.
  • Added workflow_dispatch trigger to the tag_and_publish workflow.
.github/workflows/tag_and_publish.yml

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

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @5hojib - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider separating the SQLite query fix from the style changes into its own PR for better change tracking and review clarity.
  • Please document the purpose of adding workflow_dispatch to the GitHub workflow file.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@5hojib 5hojib merged commit 02d5045 into dev Jan 19, 2025
2 checks passed
@5hojib 5hojib deleted the test branch January 19, 2025 03:30
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.

2 participants