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

add CI to disallow syntax errors and undefined vars in all Python files #861

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

vkuzo
Copy link
Contributor

@vkuzo vkuzo commented Sep 10, 2024

Summary:

Adds two codebase-wide checks for Python files:

  1. syntax errors (E999)
  2. undefined variables (F821)

Both of these resulted in internal breakages recently, so would be good to just have CI block these from landing in OSS.

Test Plan:

Tested that the new rules pass locally:

ruff check --isolated --select E999,F821

Reviewers:

Subscribers:

Tasks:

Tags:

Summary:

Adds two codebase-wide checks for Python files:
1. syntax errors (E999)
2. undefined variables (F821)

Both of these resulted in internal breakages recently, so would be good
to just have CI block these from landing in OSS.

Test Plan:

Tested that the new rules pass locally:

```
ruff check --isolated --select E999,F821
```

Reviewers:

Subscribers:

Tasks:

Tags:
Copy link

pytorch-bot bot commented Sep 10, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/861

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 45e986d with merge base 3e9746c (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 10, 2024
@msaroufim msaroufim merged commit 93b5869 into main Sep 10, 2024
17 checks passed
@msaroufim msaroufim deleted the 20240909_ruff_syntax_errors branch September 10, 2024 10:18
jainapurva pushed a commit that referenced this pull request Sep 10, 2024
…es (#861)

Summary:

Adds two codebase-wide checks for Python files:
1. syntax errors (E999)
2. undefined variables (F821)

Both of these resulted in internal breakages recently, so would be good
to just have CI block these from landing in OSS.

Test Plan:

Tested that the new rules pass locally:

```
ruff check --isolated --select E999,F821
```

Reviewers:

Subscribers:

Tasks:

Tags:
yanbing-j pushed a commit to yanbing-j/ao that referenced this pull request Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants