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

Ensure naming-convention-violation does not check variables in main block #989

Merged

Conversation

david-yz-liu
Copy link
Contributor

@david-yz-liu david-yz-liu commented Dec 10, 2023

Motivation and Context

The naming-convention-violation error was being flagged for variables defined within a main block. However, this was unintentional (and inconsistent with the global variables checker), as instructors sometimes like to use the main block to write demo code to provide to students.

Your Changes

Description: Update the naming-convention-violation check to exclude variables in the main block.

Type of change (select all that apply):

  • Bug fix (non-breaking change which fixes an issue)

Testing

Tested manually and added an additional test case.

Questions and Comments (if applicable)

Checklist

  • I have performed a self-review of my own code.
  • I have verified that the CI tests have passed.
  • I have reviewed the test coverage changes reported on Coveralls.
  • I have added tests for my changes.
  • I have updated the CHANGELOG.md file.

@coveralls
Copy link
Collaborator

coveralls commented Dec 10, 2023

Pull Request Test Coverage Report for Build 7160263097

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 94.606%

Totals Coverage Status
Change from base Build 7160206745: 0.002%
Covered Lines: 3420
Relevant Lines: 3615

💛 - Coveralls

@david-yz-liu david-yz-liu merged commit 53a4cc7 into pyta-uoft:master Dec 10, 2023
13 checks passed
@david-yz-liu david-yz-liu deleted the invalid-name-checker-main-block branch December 10, 2023 21:16
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