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

style: fix ruff check #251

Merged
merged 5 commits into from
Jun 28, 2023
Merged

style: fix ruff check #251

merged 5 commits into from
Jun 28, 2023

Conversation

Gaiejj
Copy link
Member

@Gaiejj Gaiejj commented Jun 24, 2023

Description

Fix code style according to the newest ruff.

Motivation and Context

Due to the ruff version update, the current code does not comply with the latest ruff specifications. PR #250 has encountered issues during the lint check. This pull request will modify the code according to the latest Ruff specifications, enabling PR #250 to merge after rebasing.

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds core functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (update in the documentation)

Checklist

Go over all the following points, and put an x in all the boxes that apply.
If you are unsure about any of these, don't hesitate to ask. We are here to help!

  • I have read the CONTRIBUTION guide. (required)
  • My change requires a change to the documentation.
  • I have updated the tests accordingly. (required for a bug fix or a new feature)
  • I have updated the documentation accordingly.
  • I have reformatted the code using make format. (required)
  • I have checked the code using make lint. (required)
  • I have ensured make test pass. (required)

@Gaiejj Gaiejj changed the title Dev ruff style: fix ruff check Jun 24, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #251 (6042853) into main (a079102) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 6042853 differs from pull request most recent head 7f3fea6. Consider uploading reports for the commit 7f3fea6 to get more accurate results

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main     #251      +/-   ##
==========================================
- Coverage   97.03%   97.01%   -0.01%     
==========================================
  Files         138      138              
  Lines        6994     6994              
==========================================
- Hits         6786     6785       -1     
- Misses        208      209       +1     
Impacted Files Coverage Δ
omnisafe/common/offline/dataset.py 92.49% <100.00%> (+0.04%) ⬆️
omnisafe/envs/core.py 90.62% <100.00%> (ø)
omnisafe/envs/mujoco_env.py 93.33% <100.00%> (ø)
omnisafe/envs/safety_gymnasium_env.py 97.96% <100.00%> (ø)
omnisafe/envs/safety_gymnasium_modelbased.py 94.17% <100.00%> (-0.03%) ⬇️
omnisafe/utils/math.py 94.12% <100.00%> (-2.94%) ⬇️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

zmsn-2077
zmsn-2077 previously approved these changes Jun 26, 2023
Copy link
Member

@XuehaiPan XuehaiPan left a comment

Choose a reason for hiding this comment

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

May also run pre-commit autoupdate to update the ruff version in pre-commit-config.yaml.

@zmsn-2077 zmsn-2077 merged commit 02376c7 into PKU-Alignment:main Jun 28, 2023
4 checks passed
@Gaiejj Gaiejj deleted the dev-ruff branch August 2, 2023 06:48
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.

None yet

4 participants