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

Rework format lint checks for pre-commit #904

Merged

Conversation

bpkroth
Copy link
Contributor

@bpkroth bpkroth commented Dec 31, 2024

Pull Request

Title

Reworks build to use pre-commit for format and lint checks.


Description

As mentioned in #902 and #903, this refactors the build system to use pre-commit for the following reasons:


Type of Change

  • ✨ New feature
  • 🔄 Refactor
  • 📝 Documentation update
  • 🧪 Tests

Testing

Manually locally and usual CI tests.


Additional Notes (optional)

This builds off of #903 and is prep work to change the syntax of the codebase using pyupgrade.


@bpkroth bpkroth mentioned this pull request Jan 2, 2025
@bpkroth bpkroth enabled auto-merge (squash) January 3, 2025 22:41
@bpkroth bpkroth merged commit 65cb0da into microsoft:main Jan 3, 2025
15 checks passed
@bpkroth bpkroth deleted the rework-format-lint-checks-for-pre-commit branch January 3, 2025 22:58
motus pushed a commit that referenced this pull request Jan 3, 2025
# Pull Request

## Title

Updates most of the python code for updated syntax after #904 

---

## Description

- Reformats the code in bulks with `pyupgrade`
- Apply some additional autoflake and isort fixes for the no longer
necessary imports.
- Fixup a few places that need to use `__futures__ import annotations`
for forward references in type hints (and run pyupgrade again to remove
the previous quoted string versions).
- Adjusts a few docstrings, but not all of the `Optional` and `Union`
ones (due to difficulties with regex and matching braces).
- Closes #749 

---

## Type of Change

- 🔄 Refactor

---

## Testing

Usual CI

---

## Additional Notes (optional)

Should be merged after #904  

---
@bpkroth bpkroth mentioned this pull request Jan 3, 2025
motus pushed a commit that referenced this pull request Jan 4, 2025
# Pull Request

## Title

Remove use of yq.

---

## Description

Removes the use of yq which doesn't always exist and running it via
conda apparently has issues.

---

## Type of Change

- 🛠️ Bug fix

---

## Testing

CI

---

## Additional Notes (optional)

Fixes a bug introduced in #904 

---
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