Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various lint issues - part 3 #45

Merged
merged 1 commit into from
May 15, 2024
Merged

Conversation

winstonsung
Copy link
Collaborator

@winstonsung winstonsung commented Apr 25, 2024

  • C0103: invalid-name
  • C0301: line-too-long
  • C0303: trailing-whitespace
  • C0325: superfluous-parens
  • C0411: wrong-import-order
  • R1705: no-else-return
  • R1719: simplifiable-if-expression
  • W1309: f-string-without-interpolation
  • W1514: unspecified-encoding

Bug: #45
Change-Id: Id4ec6866e3ae003c2e7b0320b6ffe8fb6b38508b

Summary by CodeRabbit

  • New Features

    • Added method setup(bot) for initializing bot configurations.
    • Introduced create_ctf() function for enhanced CTF creation.
  • Bug Fixes

    • Corrected assignment in charge method to ensure proper ticket management.
  • Improvements

    • Updated SQL queries for table creation and database operations.
    • Renamed methods and parameters for better readability and consistency.
  • Refactor

    • Modified various methods and classes for improved code structure and maintainability.

winstonsung added a commit to winstonsung/scaict-uwu that referenced this pull request Apr 25, 2024
- C0103: invalid-name
- C0301: line-too-long
- C0303: trailing-whitespace
- C0325: superfluous-parens
- C0411: wrong-import-order
- R1705: no-else-return
- R1719: simplifiable-if-expression
- W1309: f-string-without-interpolation
- W1514: unspecified-encoding

Bug: SCAICT#45
Change-Id: Id4ec6866e3ae003c2e7b0320b6ffe8fb6b38508b
winstonsung added a commit to winstonsung/scaict-uwu that referenced this pull request Apr 25, 2024
- C0103: invalid-name
- C0301: line-too-long
- C0303: trailing-whitespace
- C0325: superfluous-parens
- C0411: wrong-import-order
- R1705: no-else-return
- R1719: simplifiable-if-expression
- W1309: f-string-without-interpolation
- W1514: unspecified-encoding

Bug: SCAICT#45
Change-Id: Id4ec6866e3ae003c2e7b0320b6ffe8fb6b38508b
@winstonsung winstonsung marked this pull request as ready for review April 25, 2024 05:53
winstonsung added a commit to winstonsung/scaict-uwu that referenced this pull request Apr 25, 2024
- C0103: invalid-name
- C0301: line-too-long
- C0303: trailing-whitespace
- C0325: superfluous-parens
- C0411: wrong-import-order
- R1705: no-else-return
- R1719: simplifiable-if-expression
- W1309: f-string-without-interpolation
- W1514: unspecified-encoding

Bug: SCAICT#45
Change-Id: Id4ec6866e3ae003c2e7b0320b6ffe8fb6b38508b
winstonsung added a commit to winstonsung/scaict-uwu that referenced this pull request Apr 26, 2024
- C0103: invalid-name
- C0301: line-too-long
- C0303: trailing-whitespace
- C0325: superfluous-parens
- C0411: wrong-import-order
- R1705: no-else-return
- R1719: simplifiable-if-expression
- W1309: f-string-without-interpolation
- W1514: unspecified-encoding

Bug: SCAICT#45
Change-Id: Id4ec6866e3ae003c2e7b0320b6ffe8fb6b38508b
winstonsung added a commit to winstonsung/scaict-uwu that referenced this pull request Apr 26, 2024
- C0103: invalid-name
- C0301: line-too-long
- C0303: trailing-whitespace
- C0325: superfluous-parens
- C0411: wrong-import-order
- R1705: no-else-return
- R1719: simplifiable-if-expression
- W1309: f-string-without-interpolation
- W1514: unspecified-encoding

Bug: SCAICT#45
Change-Id: Id4ec6866e3ae003c2e7b0320b6ffe8fb6b38508b
@winstonsung winstonsung mentioned this pull request Apr 27, 2024
winstonsung added a commit to winstonsung/scaict-uwu that referenced this pull request Apr 30, 2024
- C0103: invalid-name
- C0301: line-too-long
- C0303: trailing-whitespace
- C0325: superfluous-parens
- C0411: wrong-import-order
- R1705: no-else-return
- R1719: simplifiable-if-expression
- R1728: consider-using-generator
- W1309: f-string-without-interpolation
- W1514: unspecified-encoding

Bug: SCAICT#45
Change-Id: Id4ec6866e3ae003c2e7b0320b6ffe8fb6b38508b
winstonsung added a commit to winstonsung/scaict-uwu that referenced this pull request May 1, 2024
- Duplicated renamed file sqlAcc.py => sql_acc.py
- C0103: invalid-name
- C0301: line-too-long
- C0303: trailing-whitespace
- C0325: superfluous-parens
- C0411: wrong-import-order
- R1705: no-else-return
- R1719: simplifiable-if-expression
- R1728: consider-using-generator
- W1309: f-string-without-interpolation
- W1514: unspecified-encoding

Bug: SCAICT#45
Change-Id: Id4ec6866e3ae003c2e7b0320b6ffe8fb6b38508b
winstonsung added a commit to winstonsung/scaict-uwu that referenced this pull request May 1, 2024
- Duplicated renamed file sqlAcc.py => sql_acc.py
- C0103: invalid-name
- C0301: line-too-long
- C0303: trailing-whitespace
- C0325: superfluous-parens
- C0411: wrong-import-order
- R1705: no-else-return
- R1719: simplifiable-if-expression
- R1728: consider-using-generator
- W0622: redefined-builtin
- W1309: f-string-without-interpolation
- W1514: unspecified-encoding

Bug: SCAICT#45
Change-Id: Id4ec6866e3ae003c2e7b0320b6ffe8fb6b38508b
winstonsung added a commit to winstonsung/scaict-uwu that referenced this pull request May 5, 2024
- Duplicated renamed file sqlAcc.py => sql_acc.py
- C0103: invalid-name
- C0301: line-too-long
- C0303: trailing-whitespace
- C0325: superfluous-parens
- C0411: wrong-import-order
- R1705: no-else-return
- R1719: simplifiable-if-expression
- R1728: consider-using-generator
- W0622: redefined-builtin
- W1309: f-string-without-interpolation
- W1514: unspecified-encoding

Bug: SCAICT#45
Change-Id: Id4ec6866e3ae003c2e7b0320b6ffe8fb6b38508b
@Edit-Mr Edit-Mr deleted the branch SCAICT:development May 7, 2024 12:22
@Edit-Mr Edit-Mr closed this May 7, 2024
@winstonsung
Copy link
Collaborator Author

?

winstonsung added a commit to winstonsung/scaict-uwu that referenced this pull request May 7, 2024
- Duplicated renamed file sqlAcc.py => sql_acc.py
- C0103: invalid-name
- C0301: line-too-long
- C0303: trailing-whitespace
- C0325: superfluous-parens
- C0411: wrong-import-order
- R1705: no-else-return
- R1719: simplifiable-if-expression
- R1728: consider-using-generator
- W0622: redefined-builtin
- W1309: f-string-without-interpolation
- W1514: unspecified-encoding

Bug: SCAICT#45
Change-Id: Id4ec6866e3ae003c2e7b0320b6ffe8fb6b38508b
@winstonsung winstonsung reopened this May 13, 2024
Copy link

coderabbitai bot commented May 13, 2024

Walkthrough

The recent updates span multiple files, focusing on method renaming, parameter adjustments, and SQL query modifications. These changes enhance clarity, ensure proper functionality, and improve database interactions. Significant alterations include renaming functions for consistency, adjusting SQL table definitions, and refining method parameters and variable names.

Changes

Files Change Summary
cog/admin_role.py Modified methods in AdminRole class, added setup method.
cog/comment.py Added imports, modified methods in Comment class, added setup function.
cog/core/gen_ctf.py Replaced CreateCtf() with create_ctf(), updated comments and SQL queries.
cog/core/sql.py Updated function parameters and variable names for database operations.
cog/core/sql_acc.py Modified SQL queries for table creation and database selection.
cog/ctf.py Renamed functions and class, adjusted method parameters.
cog/daily_charge.py Corrected assignment in charge method.
cog/game.py Modified method parameters, variable names, and formatting in Game class.
test/ctf_get.py Established connection and imported CTF data from JSON file into database.

🐾 In the realm of code, where logic sings,
Methods renamed, like birds on wings.
SQL queries now refined with care,
Data flows smoothly, a breeze in the air.
Functions and classes, all aligned,
A symphony of changes, perfectly timed.
Celebrate the tweaks, both big and small,
For in this update, we stand tall! 🎉


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
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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 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 for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Edit-Mr
Copy link
Member

Edit-Mr commented May 13, 2024

Important

Auto Review Skipped

Auto reviews are disabled on base/target branches other than the default branch. Please add the base/target branch pattern to the list of additional branches to be reviewed in the settings.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
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
Tips

Review it

Copy link

coderabbitai bot commented May 13, 2024

@winstonsung, I will review the changes.

Actions Performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Edit-Mr
Copy link
Member

Edit-Mr commented May 13, 2024

@coderabbitai According to the code winstonsung wrote, how old do you think he is?

@winstonsung
Copy link
Collaborator Author

@coderabbitai review

Copy link

coderabbitai bot commented May 14, 2024

Actions Performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@winstonsung
Copy link
Collaborator Author

@coderabbitai review

Copy link

coderabbitai bot commented May 14, 2024

Actions Performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Out of diff range and nitpick comments (2)
cog/ctf.py (2)

Line range hint 46-190: The button_callback_1 method is correctly implemented but could benefit from additional comments for clarity.

Consider adding more comments to explain the logic and SQL operations for better readability.


Line range hint 192-272: The create method is correctly implemented but could benefit from additional comments for clarity.

Consider adding more comments to explain the logic and SQL operations for better readability.

Review Details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE

Commits Files that changed from the base of the PR and between 22e2ed3 and 5dc274b.
Files selected for processing (9)
  • cog/admin_role.py (1 hunks)
  • cog/comment.py (5 hunks)
  • cog/core/gen_ctf.py (2 hunks)
  • cog/core/sql.py (1 hunks)
  • cog/core/sql_acc.py (2 hunks)
  • cog/ctf.py (5 hunks)
  • cog/daily_charge.py (1 hunks)
  • cog/game.py (2 hunks)
  • test/ctf_get.py (1 hunks)
Files skipped from review as they are similar to previous changes (8)
  • cog/admin_role.py
  • cog/comment.py
  • cog/core/gen_ctf.py
  • cog/core/sql.py
  • cog/core/sql_acc.py
  • cog/daily_charge.py
  • cog/game.py
  • test/ctf_get.py
Additional comments not posted (6)
cog/ctf.py (6)

Line range hint 1-19: Import statements are correctly grouped and ordered according to PEP 8 guidelines.


20-29: The get_ctf_makers function is well-implemented with appropriate error handling for file operations.


32-34: The generate_ctf_id function is simple and correctly implemented.


36-38: The on_ready method is correctly implemented.


43-45: The __init__ method of CTFView is correctly implemented with no timeout.


294-295: The setup function is correctly implemented.

winstonsung added a commit to winstonsung/scaict-uwu that referenced this pull request May 14, 2024
- Duplicated renamed file sqlAcc.py => sql_acc.py
- C0103: invalid-name
- C0301: line-too-long
- C0303: trailing-whitespace
- C0325: superfluous-parens
- C0411: wrong-import-order
- R1705: no-else-return
- R1719: simplifiable-if-expression
- R1728: consider-using-generator
- W0622: redefined-builtin
- W1309: f-string-without-interpolation
- W1514: unspecified-encoding

Bug: SCAICT#45
Change-Id: Id4ec6866e3ae003c2e7b0320b6ffe8fb6b38508b
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review Details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE

Commits Files that changed from the base of the PR and between 5dc274b and 065ed84.
Files selected for processing (9)
  • cog/admin_role.py (1 hunks)
  • cog/comment.py (5 hunks)
  • cog/core/gen_ctf.py (2 hunks)
  • cog/core/sql.py (1 hunks)
  • cog/core/sql_acc.py (2 hunks)
  • cog/ctf.py (5 hunks)
  • cog/daily_charge.py (1 hunks)
  • cog/game.py (2 hunks)
  • test/ctf_get.py (1 hunks)
Files skipped from review as they are similar to previous changes (8)
  • cog/admin_role.py
  • cog/comment.py
  • cog/core/gen_ctf.py
  • cog/core/sql.py
  • cog/core/sql_acc.py
  • cog/daily_charge.py
  • cog/game.py
  • test/ctf_get.py
Additional comments not posted (10)
cog/ctf.py (10)

Line range hint 1-19: Import statements are well-organized and follow PEP 8 guidelines.


20-29: The get_ctf_makers function includes comprehensive error handling for file operations. Good job!


32-34: The generate_ctf_id function is simple and effective for generating random CTF IDs.


36-38: The on_ready method correctly adds a view to the bot when it is ready.


43-45: The __init__ method correctly initializes the view with no timeout.


Line range hint 55-58: The __init__ method of SubmitModal correctly initializes the modal with an input field for the flag.


61-190: The callback method of SubmitModal handles flag submissions effectively and includes necessary SQL operations. Good job!


52-53: The button_callback_1 method correctly calls the SubmitModal class and handles user interactions.

Also applies to: 191-191


Line range hint 192-272: The create method effectively handles the creation of new CTF challenges and includes necessary SQL operations. Good job!


294-295: The setup function correctly adds the CTF cog to the bot.

@Edit-Mr
Copy link
Member

Edit-Mr commented May 15, 2024

@winstonsung 我該 merge 嗎

@winstonsung
Copy link
Collaborator Author

你覺得沒問題就可以合併了。還在改的會寫WIP並且標為draft(草稿)。

winstonsung added a commit to winstonsung/scaict-uwu that referenced this pull request May 15, 2024
- Duplicated renamed file sqlAcc.py => sql_acc.py
- C0103: invalid-name
- C0301: line-too-long
- C0303: trailing-whitespace
- C0325: superfluous-parens
- C0411: wrong-import-order
- R1705: no-else-return
- R1719: simplifiable-if-expression
- R1728: consider-using-generator
- W0622: redefined-builtin
- W1309: f-string-without-interpolation
- W1514: unspecified-encoding

Bug: SCAICT#45
Change-Id: Id4ec6866e3ae003c2e7b0320b6ffe8fb6b38508b
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Out of diff range and nitpick comments (4)
cog/comment.py (2)

Line range hint 73-94: Ensure proper error handling for SQL operations.

To make the function more robust, include error handling for SQL operations.

try:
    connection, cursor = link_sql() # SQL 會話
    # existing code...
except Exception as e:
    print(f"Error: {e}")
    end(connection, cursor)

Line range hint 116-184: Ensure proper error handling for SQL operations.

To make the function more robust, include error handling for SQL operations.

try:
    connection, cursor = link_sql() # SQL 會話
    # existing code...
except Exception as e:
    print(f"Error: {e}")
    end(connection, cursor)
cog/ctf.py (2)

Line range hint 53-94: Ensure proper error handling for SQL operations.

To make the function more robust, include error handling for SQL operations.

try:
    connection, cursor = link_sql() # SQL 會話
    # existing code...
except Exception as e:
    print(f"Error: {e}")
    end_sql(connection, cursor)

Line range hint 221-272: Ensure proper error handling for SQL operations.

To make the function more robust, include error handling for SQL operations.

try:
    connection, cursor = link_sql() # SQL 會話
    # existing code...
except Exception as e:
    print(f"Error: {e}")
    end_sql(connection, cursor)
Review Details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE

Commits Files that changed from the base of the PR and between 065ed84 and c2ee036.
Files selected for processing (9)
  • cog/admin_role.py (1 hunks)
  • cog/comment.py (5 hunks)
  • cog/core/gen_ctf.py (2 hunks)
  • cog/core/sql.py (1 hunks)
  • cog/core/sql_acc.py (2 hunks)
  • cog/ctf.py (5 hunks)
  • cog/daily_charge.py (1 hunks)
  • cog/game.py (2 hunks)
  • test/ctf_get.py (1 hunks)
Files skipped from review as they are similar to previous changes (7)
  • cog/admin_role.py
  • cog/core/gen_ctf.py
  • cog/core/sql.py
  • cog/core/sql_acc.py
  • cog/daily_charge.py
  • cog/game.py
  • test/ctf_get.py
Additional comments not posted (12)
cog/comment.py (7)

24-25: LGTM! The insert_user function is straightforward and correctly inserts a user into the specified table.


29-30: LGTM! The get_channels function correctly reads the JSON configuration file to get channel information.


32-37: LGTM! The reset function correctly resets user comment-related data.


39-61: LGTM! The reward function correctly updates user points based on their comments.


Line range hint 68-71: LGTM! The __init__ method correctly initializes the Comment class.


97-112: LGTM! The today_comment method correctly updates user comment-related data.


253-254: LGTM! The setup function correctly adds the Comment cog to the bot.

cog/ctf.py (5)

20-29: LGTM! The get_ctf_makers function correctly reads the JSON configuration file to get CTF makers information.


32-33: LGTM! The generate_ctf_id function correctly generates a random CTF ID.


36-38: LGTM! The on_ready method correctly adds a view to the bot.


44-45: LGTM! The __init__ method correctly initializes the CTFView class.


Line range hint 295-296: LGTM! The setup function correctly adds the CTF cog to the bot.

cog/comment.py Outdated Show resolved Hide resolved
cog/ctf.py Outdated Show resolved Hide resolved
cog/ctf.py Outdated Show resolved Hide resolved
cog/ctf.py Outdated Show resolved Hide resolved
- Duplicated renamed file sqlAcc.py => sql_acc.py
- C0103: invalid-name
- C0301: line-too-long
- C0303: trailing-whitespace
- C0325: superfluous-parens
- C0411: wrong-import-order
- R1705: no-else-return
- R1719: simplifiable-if-expression
- R1728: consider-using-generator
- W0622: redefined-builtin
- W1309: f-string-without-interpolation
- W1514: unspecified-encoding

Bug: SCAICT#45
Change-Id: Id4ec6866e3ae003c2e7b0320b6ffe8fb6b38508b
@winstonsung
Copy link
Collaborator Author

@coderabbitai review

Copy link

coderabbitai bot commented May 15, 2024

Actions Performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 16

Review Details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE

Commits Files that changed from the base of the PR and between c2ee036 and 7e50659.
Files selected for processing (9)
  • cog/admin_role.py (1 hunks)
  • cog/comment.py (2 hunks)
  • cog/core/gen_ctf.py (2 hunks)
  • cog/core/sql.py (1 hunks)
  • cog/core/sql_acc.py (2 hunks)
  • cog/ctf.py (4 hunks)
  • cog/daily_charge.py (1 hunks)
  • cog/game.py (2 hunks)
  • test/ctf_get.py (1 hunks)
Files skipped from review as they are similar to previous changes (6)
  • cog/admin_role.py
  • cog/core/gen_ctf.py
  • cog/core/sql.py
  • cog/core/sql_acc.py
  • cog/daily_charge.py
  • test/ctf_get.py
Additional comments not posted (13)
cog/comment.py (1)

244-244: Fix the calculation.

The calculation for correct should be simplified and clarified for better readability.

- correct = 100 - (sum((int(hex_color[i], 16) - int(nice_color[i], 16)) ** 2 for i in range(3)) ** 0.5 / 0.2598076211353316)
+ correct = 100 - (sum((int(hex_color[i], 16) - int(nice_color[i], 16)) ** 2 for i in range(3)) ** 0.5 / 0.2598076211353316)
cog/ctf.py (12)

Line range hint 1-19: Import order follows PEP 8 guidelines. Good job!


20-29: The get_ctf_makers function is well-implemented with proper error handling for file operations.


32-33: The generate_ctf_id function is simple and effective.


36-38: The on_ready method correctly adds a view to the bot.


43-45: The __init__ method correctly initializes the view with no timeout.


Line range hint 54-61: The SubmitModal inner class is well-implemented for flag submission.


62-194: The SQL operations in the button_callback_1 method are well-handled with proper error handling.


196-196: The response handling in the button_callback_1 method is appropriate and user-friendly.


215-219: The role and permission checks in the create method are correctly implemented.


227-282: The SQL operations in the create method are well-handled with proper error handling.


266-267: The response handling in the create method is appropriate and user-friendly.


305-306: The setup function correctly adds the CTF cog to the bot.

cog/game.py Show resolved Hide resolved
cog/game.py Show resolved Hide resolved
cog/game.py Show resolved Hide resolved
cog/game.py Show resolved Hide resolved
cog/game.py Show resolved Hide resolved
cog/comment.py Show resolved Hide resolved
cog/comment.py Show resolved Hide resolved
cog/comment.py Show resolved Hide resolved
cog/comment.py Show resolved Hide resolved
cog/comment.py Show resolved Hide resolved
@Edit-Mr Edit-Mr merged commit abeae8a into SCAICT:development May 15, 2024
@winstonsung winstonsung deleted the dev-45 branch May 15, 2024 11:46
winstonsung added a commit to winstonsung/scaict-uwu that referenced this pull request May 15, 2024
Bug: SCAICT#45
Bug: SCAICT#60
Change-Id: If094a17e440e4e497561ab48d16a8550a4a5f3e3
winstonsung added a commit to winstonsung/scaict-uwu that referenced this pull request May 15, 2024
Bug: SCAICT#45
Bug: SCAICT#60
Change-Id: If094a17e440e4e497561ab48d16a8550a4a5f3e3
winstonsung added a commit to winstonsung/scaict-uwu that referenced this pull request May 15, 2024
Bug: SCAICT#45
Bug: SCAICT#60
Change-Id: If094a17e440e4e497561ab48d16a8550a4a5f3e3
@winstonsung winstonsung self-assigned this Jun 2, 2024
@winstonsung winstonsung linked an issue Jun 29, 2024 that may be closed by this pull request
@winstonsung winstonsung added this to the 0.1.5 milestone Jul 23, 2024
@winstonsung winstonsung added the bug Something isn't working label Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Pylint CI
2 participants