-
-
Notifications
You must be signed in to change notification settings - Fork 1k
feat:script to check ts-ignore #3246
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
feat:script to check ts-ignore #3246
Conversation
Warning Rate limit exceeded@palisadoes has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 26 minutes and 43 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughThe pull request updates the GitHub Actions workflow by consolidating separate jobs into a single job named Changes
Possibly related PRs
Suggested labels
Suggested reviewers
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 using PR comments)
Other keywords and placeholders
Documentation and Community
|
Our Pull Request Approval ProcessThanks for contributing! Testing Your CodeRemember, your PRs won't be reviewed until these criteria are met:
Our policies make our code better. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🔭 Outside diff range comments (1)
.github/workflows/pull-request.yml (1)
185-185
:⚠️ Potential issueUpdate job dependencies after consolidation.
The
Run-Tests
job still depends on the removedcheck_code_coverage_disable
job.Apply this diff to fix the dependencies:
- needs: [Code-Quality-Checks, check_code_coverage_disable] + needs: [Code-Quality-Checks, python_checks]
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/pull-request.yml
(2 hunks).github/workflows/scripts/detect_ts_ignore.py
(1 hunks)
🧰 Additional context used
🪛 Ruff (0.8.2)
.github/workflows/scripts/detect_ts_ignore.py
4-4: Missing return type annotation for public function check_ts_ignore
Add return type annotation: int
(ANN201)
4-4: Missing type annotation for function argument files
(ANN001)
18-18: Unnecessary open mode parameters
Remove open mode parameters
(UP015)
25-25: Do not catch blind exception: Exception
(BLE001)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Analyse Code With CodeQL (typescript)
🔇 Additional comments (2)
.github/workflows/scripts/detect_ts_ignore.py (1)
31-37
: LGTM! Well-structured CLI implementation.The main entry point is well-implemented with proper argument parsing and exit code handling.
.github/workflows/pull-request.yml (1)
51-79
: LGTM! Well-structured job consolidation.The Python checks are now consolidated into a single job with clear step names and proper file handling.
Our Pull Request Approval ProcessThanks for contributing! Testing Your CodeRemember, your PRs won't be reviewed until these criteria are met:
Our policies make our code better. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
There was a problem hiding this 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
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/scripts/detect_ts_ignore.py
(1 hunks)
🧰 Additional context used
🪛 Ruff (0.8.2)
.github/workflows/scripts/detect_ts_ignore.py
25-25: Replace aliased errors with OSError
Replace with builtin OSError
(UP024)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Analyse Code With CodeQL (typescript)
🔇 Additional comments (1)
.github/workflows/scripts/detect_ts_ignore.py (1)
1-4
: LGTM!The imports are appropriate, and the function signature is well-defined with proper type annotations.
Our Pull Request Approval ProcessThanks for contributing! Testing Your CodeRemember, your PRs won't be reviewed until these criteria are met:
Our policies make our code better. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
@palisadoes could you review my PR ? |
Our Pull Request Approval ProcessThanks for contributing! Testing Your CodeRemember, your PRs won't be reviewed until these criteria are met:
Our policies make our code better. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/scripts/detect_ts_ignore.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
.github/workflows/scripts/detect_ts_ignore.py (1)
Learnt from: shivasankaran18
PR: PalisadoesFoundation/talawa-api#3246
File: .github/workflows/scripts/detect_ts_ignore.py:25-25
Timestamp: 2025-02-18T17:15:18.046Z
Learning: In Python 3, `IOError` is an alias for `OSError`, so using just `OSError` in except clauses is preferred for cleaner code.
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Analyse Code With CodeQL (typescript)
🔇 Additional comments (2)
.github/workflows/scripts/detect_ts_ignore.py (2)
8-17
: LGTM!The function signature has proper type annotations and the docstring is well-formatted with matching type information.
35-41
: Add validation for TypeScript files.The script should validate that the provided files are TypeScript files to avoid unnecessary processing.
Apply this diff to add file validation:
parser = argparse.ArgumentParser(description="Check for @ts-ignore in changed files.") parser.add_argument("--files", nargs="+", help="List of changed files", required=True) args = parser.parse_args() + # Filter TypeScript files + ts_files = [f for f in args.files if f.endswith(('.ts', '.tsx'))] + if not ts_files: + print("ℹ️ No TypeScript files to check.") + sys.exit(0) + - exit_code = check_ts_ignore(args.files) + exit_code = check_ts_ignore(ts_files) sys.exit(exit_code)
Our Pull Request Approval ProcessThanks for contributing! Testing Your CodeRemember, your PRs won't be reviewed until these criteria are met:
Our policies make our code better. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/scripts/detect_ts_ignore.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
.github/workflows/scripts/detect_ts_ignore.py (1)
Learnt from: shivasankaran18
PR: PalisadoesFoundation/talawa-api#3246
File: .github/workflows/scripts/detect_ts_ignore.py:25-25
Timestamp: 2025-02-18T17:15:18.046Z
Learning: In Python 3, `IOError` is an alias for `OSError`, so using just `OSError` in except clauses is preferred for cleaner code.
🪛 Ruff (0.8.2)
.github/workflows/scripts/detect_ts_ignore.py
32-32: SyntaxError: Expected an indented block after if
statement
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Analyse Code With CodeQL (typescript)
🔇 Additional comments (3)
.github/workflows/scripts/detect_ts_ignore.py (3)
1-7
: LGTM! Well-structured script setup.The script has a proper shebang line, necessary imports, and a well-defined regex pattern constant.
8-17
: LGTM! Well-documented function with proper type annotations.The function is well-documented with Google-style docstrings and includes appropriate type annotations.
37-43
: LGTM! Well-structured main entry point.The argument parsing and exit code handling are implemented correctly.
Our Pull Request Approval ProcessThanks for contributing! Testing Your CodeRemember, your PRs won't be reviewed until these criteria are met:
Our policies make our code better. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
@palisadoes could you review my PR now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see comments
Our Pull Request Approval ProcessThanks for contributing! Testing Your CodeRemember, your PRs won't be reviewed until these criteria are met:
Our policies make our code better. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
1 similar comment
Our Pull Request Approval ProcessThanks for contributing! Testing Your CodeRemember, your PRs won't be reviewed until these criteria are met:
Our policies make our code better. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop-postgres #3246 +/- ##
====================================================
+ Coverage 45.48% 46.52% +1.04%
====================================================
Files 455 455
Lines 33935 33940 +5
Branches 757 812 +55
====================================================
+ Hits 15435 15791 +356
+ Misses 18496 18149 -347
+ Partials 4 0 -4 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (1)
.github/workflows/scripts/detect_ts_ignore.py (1)
31-32
:⚠️ Potential issueMove success message outside the file loop.
The success message is currently inside the file loop, which means it will be printed for each file that doesn't have violations. This makes the output noisy and confusing.
Apply this diff to fix the success message placement:
- if not ts_ignore_found: - print("✅ No '@ts-ignore' comments found in the files.") return 1 if ts_ignore_found else 0 + if not ts_ignore_found: + print("✅ No '@ts-ignore' comments found in the files.")
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/pull-request.yml
(3 hunks).github/workflows/scripts/detect_ts_ignore.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
.github/workflows/scripts/detect_ts_ignore.py (1)
Learnt from: shivasankaran18
PR: PalisadoesFoundation/talawa-api#3246
File: .github/workflows/scripts/detect_ts_ignore.py:25-25
Timestamp: 2025-02-18T17:15:18.046Z
Learning: In Python 3, `IOError` is an alias for `OSError`, so using just `OSError` in except clauses is preferred for cleaner code.
🪛 Ruff (0.8.2)
.github/workflows/scripts/detect_ts_ignore.py
36-36: Missing return type annotation for public function main
Add return type annotation: None
(ANN201)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Test Deployment to https://docs-api.talawa.io
🔇 Additional comments (1)
.github/workflows/pull-request.yml (1)
51-79
: LGTM!The
python_checks
job is well-structured and correctly consolidates Python-related checks. The job:
- Sets up Python environment
- Gets changed files
- Runs all three checks: biome ignore, code coverage disable, and ts ignore
Our Pull Request Approval ProcessThanks for contributing! Testing Your CodeRemember, your PRs won't be reviewed until these criteria are met:
Our policies make our code better. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🔭 Outside diff range comments (3)
.github/workflows/scripts/detect_ts_ignore.py (3)
47-48
:⚠️ Potential issueFix formatting issues.
Remove the extra blank line at the end of the file to fix Black formatting issues.
Apply this diff to fix the formatting:
if __name__ == "__main__": main() - -
47-48
:⚠️ Potential issueFix formatting issues.
The file has formatting issues that need to be fixed:
- Remove the extra blank line at the end of the file.
- Run Black formatter to fix code style issues.
Run the following command to fix formatting:
black .github/workflows/scripts/detect_ts_ignore.py
47-48
:⚠️ Potential issueFix formatting issues.
The file has formatting issues that are causing the Black check to fail:
- Trailing whitespace on line 47
- Empty line at the end of file
Run
black
to automatically fix these issues:black .github/workflows/scripts/detect_ts_ignore.py
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/pull-request.yml
(3 hunks).github/workflows/scripts/detect_ts_ignore.py
(1 hunks)
👮 Files not reviewed due to content moderation or server errors (2)
- .github/workflows/scripts/detect_ts_ignore.py
- .github/workflows/pull-request.yml
🧰 Additional context used
🧠 Learnings (1)
.github/workflows/scripts/detect_ts_ignore.py (1)
Learnt from: shivasankaran18
PR: PalisadoesFoundation/talawa-api#3246
File: .github/workflows/scripts/detect_ts_ignore.py:25-25
Timestamp: 2025-02-18T17:15:18.046Z
Learning: In Python 3, `IOError` is an alias for `OSError`, so using just `OSError` in except clauses is preferred for cleaner code.
🪛 GitHub Actions: Pull request workflow
.github/workflows/scripts/detect_ts_ignore.py
[error] 1-1: Black formatting check failed. 1 file would be reformatted. Run 'black' to fix code style issues in this file.
🔇 Additional comments (8)
.github/workflows/scripts/detect_ts_ignore.py (4)
36-43
: LGTM!The
main
function correctly handles argument parsing, executes the check, and manages the exit code.
36-43
: LGTM!The function is well-structured with proper argument parsing, error handling, and type annotations.
1-7
: LGTM!The imports are appropriate, and defining the pattern as a constant follows best practices.
🧰 Tools
🪛 GitHub Actions: Pull request workflow
[error] 1-1: Black formatting check failed. 1 file would be reformatted. Run 'black' to fix code style issues in this file.
36-43
: LGTM!The main function is well-structured with proper type annotations and argument parsing.
.github/workflows/pull-request.yml (4)
51-79
: LGTM!The
python_checks
job effectively consolidates Python checks into a single job, improving workflow efficiency. The job correctly:
- Runs all three checks (biome ignore, code coverage disable, and ts ignore)
- Uses the changed files output from the
changed-files
action- Maintains proper step ordering and dependencies
51-79
: LGTM!The job is well-structured and correctly consolidates all Python checks into a single job. The steps are properly ordered and use the correct Python version.
51-79
: LGTM!The consolidated
python_checks
job is well-structured and includes all necessary steps for running Python-related checks.
185-185
: LGTM!The job dependency has been correctly updated to use the new consolidated
python_checks
job.
939710b
to
d7eec03
Compare
Run the python checks in your local branch before adding more commits. |
implemented the changes @palisadoes |
|
Our Pull Request Approval ProcessThanks for contributing! Testing Your CodeRemember, your PRs won't be reviewed until these criteria are met:
Our policies make our code better. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🔭 Outside diff range comments (1)
.github/workflows/pull-request.yml (1)
51-79
: 🧹 Nitpick (assertive)Add job documentation and timeout.
Consider these improvements:
- Add comments to explain the job's purpose
- Add a timeout to prevent long-running checks
Apply this diff:
python_checks: + # Job to run various Python-based checks: + # - Biome ignore check + # - Code coverage disable check + # - TypeScript ignore check name: Run Python Checks runs-on: ubuntu-latest + timeout-minutes: 5 steps:
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/pull-request.yml
(3 hunks).github/workflows/scripts/detect_ts_ignore.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
.github/workflows/scripts/detect_ts_ignore.py (1)
Learnt from: shivasankaran18
PR: PalisadoesFoundation/talawa-api#3246
File: .github/workflows/scripts/detect_ts_ignore.py:25-25
Timestamp: 2025-02-18T17:15:18.046Z
Learning: In Python 3, `IOError` is an alias for `OSError`, so using just `OSError` in except clauses is preferred for cleaner code.
🪛 Ruff (0.8.2)
.github/workflows/scripts/detect_ts_ignore.py
29-29: Trailing comma missing
Add trailing comma
(COM812)
56-56: Trailing comma missing
Add trailing comma
(COM812)
59-59: Trailing comma missing
Add trailing comma
(COM812)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Run tests for talawa api
- GitHub Check: Analyse Code With CodeQL (typescript)
🔇 Additional comments (2)
.github/workflows/scripts/detect_ts_ignore.py (1)
1-8
: 🧹 Nitpick (assertive)Add trailing comma to improve maintainability.
The regex pattern constant could benefit from a trailing comma for better git diffs when the pattern needs to be extended.
Apply this diff:
-TS_IGNORE_PATTERN = r"(?://|/\*)\s*@ts-ignore\b" +TS_IGNORE_PATTERN = r"(?://|/\*)\s*@ts-ignore\b",Likely an incorrect or invalid review comment.
.github/workflows/pull-request.yml (1)
185-185
: LGTM! Job dependencies updated correctly.The
Run-Tests
job now correctly depends on the consolidatedpython_checks
job.
Our Pull Request Approval ProcessThanks for contributing! Testing Your CodeRemember, your PRs won't be reviewed until these criteria are met:
Our policies make our code better. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
♻️ Duplicate comments (1)
.github/workflows/scripts/detect_ts_ignore.py (1)
81-81
:⚠️ Potential issueFix critical bug in file handling.
The script filters TypeScript files but then uses the unfiltered list, which could process non-TypeScript files.
- exit_code = check_ts_ignore(args.files) + exit_code = check_ts_ignore(ts_files)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/scripts/detect_ts_ignore.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
.github/workflows/scripts/detect_ts_ignore.py (1)
Learnt from: shivasankaran18
PR: PalisadoesFoundation/talawa-api#3246
File: .github/workflows/scripts/detect_ts_ignore.py:25-25
Timestamp: 2025-02-18T17:15:18.046Z
Learning: In Python 3, `IOError` is an alias for `OSError`, so using just `OSError` in except clauses is preferred for cleaner code.
🪛 Ruff (0.8.2)
.github/workflows/scripts/detect_ts_ignore.py
29-29: Logging statement uses f-string
(G004)
34-34: Trailing comma missing
Add trailing comma
(COM812)
38-38: Trailing comma missing
Add trailing comma
(COM812)
41-41: Logging statement uses f-string
(G004)
41-41: Trailing comma missing
Add trailing comma
(COM812)
45-45: Logging statement uses f-string
(G004)
47-47: Use logging.exception
instead of logging.error
Replace with exception
(TRY400)
47-47: Logging statement uses f-string
(G004)
68-68: Trailing comma missing
Add trailing comma
(COM812)
71-71: Trailing comma missing
Add trailing comma
(COM812)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Run tests for talawa api
- GitHub Check: Analyse Code With CodeQL (typescript)
🔇 Additional comments (2)
.github/workflows/scripts/detect_ts_ignore.py (2)
85-86
: LGTM!The entry point is correctly implemented following Python best practices.
10-13
: 🧹 Nitpick (assertive)Add trailing comma for better git diffs.
Adding trailing commas helps with cleaner git diffs when adding new configuration options.
logging.basicConfig( level=logging.INFO, - format="%(levelname)s: %(message)s", + format="%(levelname)s: %(message)s", )Likely an incorrect or invalid review comment.
Our Pull Request Approval ProcessThanks for contributing! Testing Your CodeRemember, your PRs won't be reviewed until these criteria are met:
Our policies make our code better. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
♻️ Duplicate comments (1)
.github/workflows/scripts/detect_ts_ignore.py (1)
87-87
:⚠️ Potential issueFix: Use filtered TypeScript files.
The script is using unfiltered files instead of the filtered TypeScript files.
- exit_code = check_ts_ignore(args.files) + exit_code = check_ts_ignore(ts_files)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/scripts/detect_ts_ignore.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
.github/workflows/scripts/detect_ts_ignore.py (1)
Learnt from: shivasankaran18
PR: PalisadoesFoundation/talawa-api#3246
File: .github/workflows/scripts/detect_ts_ignore.py:25-25
Timestamp: 2025-02-18T17:15:18.046Z
Learning: In Python 3, `IOError` is an alias for `OSError`, so using just `OSError` in except clauses is preferred for cleaner code.
🪛 Ruff (0.8.2)
.github/workflows/scripts/detect_ts_ignore.py
31-31: Logging statement uses f-string
(G004)
41-41: Trailing comma missing
Add trailing comma
(COM812)
44-44: Logging statement uses f-string
(G004)
44-44: Trailing comma missing
Add trailing comma
(COM812)
48-48: Logging statement uses f-string
(G004)
50-50: Logging statement uses f-string
(G004)
50-50: Redundant exception object included in logging.exception
call
(TRY401)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Run tests for talawa api
- GitHub Check: Analyse Code With CodeQL (typescript)
🔇 Additional comments (2)
.github/workflows/scripts/detect_ts_ignore.py (2)
1-15
: LGTM! Well-structured file setup.The file setup is clean and follows best practices:
- Proper shebang line
- Clear module docstring
- Organized imports
- Appropriate logging configuration
- Well-defined regex pattern constant
91-92
: LGTM! Standard entry point pattern.The entry point follows the standard Python pattern for script execution.
Our Pull Request Approval ProcessThanks for contributing! Testing Your CodeRemember, your PRs won't be reviewed until these criteria are met:
Our policies make our code better. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
@palisadoes could you review the PR .? .. improved the code quality of the script |
Please test with files that have all the ts-ignore variants that the script is supposed to test and notify me. |
yeah ok @palisadoes ..will do |
|
|
yeah @palisadoes ... this now currently does not check node_modules as they are not committed to git .. I just asked to ensure should I add that check too .. this for now looks great |
@palisadoes could you review this PR..? |
d188f2d
into
PalisadoesFoundation:develop-postgres
What kind of change does this PR introduce?
Added py script to check ts-ignore in the PR files
Modified pull-request.yml to have a single job pyhton checks(biome,code coverage, check ts-ignore)
Issue Number: 3229
Fixes : #3229
If relevant, did you update the documentation?
Summary
Does this PR introduce a breaking change?
Checklist
CodeRabbit AI Review
Test Coverage
Other information
Have you read the contributing guide?
Summary by CodeRabbit
New Features
Chores
@ts-ignore
comments in TypeScript files.