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

revert dropping of noqa #784

Merged
merged 1 commit into from
Feb 14, 2024
Merged

revert dropping of noqa #784

merged 1 commit into from
Feb 14, 2024

Conversation

dberenbaum
Copy link
Contributor

Missed this failure in #783.

@AlexandreKempf
Copy link
Contributor

AlexandreKempf commented Feb 14, 2024

My editor with ruff installed from the pyproject.toml and the pre-commit didn't complain. Are you sure you don't have an outdated version of ruff?
If you're sure then I don't know why it is a problem on your side and not mine. It is curious.

If you want to merge I have nothing against it.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (aba8807) 95.55% compared to head (9409f9f) 95.55%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #784   +/-   ##
=======================================
  Coverage   95.55%   95.55%           
=======================================
  Files          55       55           
  Lines        3532     3532           
  Branches      314      314           
=======================================
  Hits         3375     3375           
  Misses        110      110           
  Partials       47       47           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dberenbaum
Copy link
Contributor Author

The failure comes from CI, not local, so we would need to check the ruff version there.

@dberenbaum
Copy link
Contributor Author

The version in the pre-commit does fail:

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.8
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format

$ pre-commit run --show-diff-on-failure --color=always --all-files
check for added large files..............................................Passed
check for case conflicts.................................................Passed
check docstring is first.................................................Passed
check that executables have shebangs.................(no files to check)Skipped
check json...............................................................Passed
check for merge conflicts................................................Passed
check toml...............................................................Passed
check yaml...............................................................Passed
debug statements (python)................................................Passed
fix end of files.........................................................Passed
mixed line ending........................................................Passed
sort simple yaml files...............................(no files to check)Skipped
trim trailing whitespace.................................................Passed
codespell................................................................Passed
ruff.....................................................................Failed
- hook id: ruff
- exit code: 1

src/dvclive/live.py:341:9: A003 Class attribute `dir` is shadowing a Python builtin
Found 1 error.

ruff-format..............................................................Passed
Pretty format TOML.......................................................Passed
Pretty format YAML.......................................................Passed

Copy link
Contributor

@AlexandreKempf AlexandreKempf left a comment

Choose a reason for hiding this comment

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

My bad then 👍

@AlexandreKempf AlexandreKempf merged commit b8526e9 into main Feb 14, 2024
14 checks passed
@AlexandreKempf AlexandreKempf deleted the revert-noqa branch February 14, 2024 14:44
@dberenbaum
Copy link
Contributor Author

Although the version from the py-template is 0.1.13 which reports the opposite:

$ ruff check src/dvclive/live.py
src/dvclive/live.py:341:28: RUF100 [*] Unused `noqa` directive (unused: `A003`)
Found 1 error.

So maybe we are better off updating the ruff version?

@AlexandreKempf
Copy link
Contributor

#786

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

3 participants