Skip to content

[Refactor:System] Enable Pylint for json_syntax_checker.py#12907

Merged
williamjallen merged 4 commits into
mainfrom
grading_pylinter
Jun 13, 2026
Merged

[Refactor:System] Enable Pylint for json_syntax_checker.py#12907
williamjallen merged 4 commits into
mainfrom
grading_pylinter

Conversation

@elsume

@elsume elsume commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Why is this Change Important & Necessary?

Continuing the work of enabling pylint on files listed in .pylintrc.

What is the New Behavior?

grading/json_syntax_checker.py will now pass pylint checks and has been removed from the ignored paths in .pylintrc.

What steps should a reviewer take to reproduce or test the bug or new feature?

Run pylint on grading/json_syntax_checker.py with python3 -m pylint grading/json_syntax_checker.py

Automated Testing & Documentation

CI will now be able to test the file.

@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.64%. Comparing base (719b0c7) to head (80d5917).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##               main   #12907   +/-   ##
=========================================
  Coverage     21.64%   21.64%           
  Complexity     9861     9861           
=========================================
  Files           268      268           
  Lines         36920    36920           
  Branches        495      495           
=========================================
  Hits           7990     7990           
  Misses        28439    28439           
  Partials        491      491           
Flag Coverage Δ
autograder 21.32% <ø> (ø)
js 2.01% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.70% <ø> (ø)
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 91.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@elsume elsume changed the title [Refactor:System] Enabled Pylint for json_syntax_checker.py [Refactor:System] Enable Pylint for json_syntax_checker.py Jun 12, 2026

@dandrecollins07-ctrl dandrecollins07-ctrl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tested on main and confirmed grading/json_syntax_checker.py was still listed in .pylintrc. Checked out this PR, confirmed the file was removed from the ignore list, and ran python3 -m pylint grading/json_syntax_checker.py, which passed with a score of 10.00/10. Minor common CI testing issues. Approving.

@github-project-automation github-project-automation Bot moved this from Seeking Reviewer to Awaiting Maintainer Review in Submitty Development Jun 12, 2026
Comment on lines -45 to +50
except Exception:
print(f'ERROR: Could not load {args.file}')
KEYS_STR = ", ".join(f"{{ {keys} }}" for keys in reversed(duplicate_keys))
print(f"WARNING: Duplicate JSON key(s) found - {KEYS_STR}")
except (OSError, json.JSONDecodeError, ValueError):
print(f"ERROR: Could not load {args.file}")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This isn't guaranteed to be a safe change. In the future, these types of bare exceptions should be handled by adding inline ignores.

I think this specific instance is acceptable because the failure case is a stack trace anyway.

@williamjallen
williamjallen merged commit 7d7fb78 into main Jun 13, 2026
24 of 27 checks passed
@williamjallen
williamjallen deleted the grading_pylinter branch June 13, 2026 23:37
@github-project-automation github-project-automation Bot moved this from Awaiting Maintainer Review to Done in Submitty Development Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants