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

Update Ruff to 0.287 or later #769

Closed
2 tasks done
tlento opened this issue Sep 7, 2023 · 0 comments · Fixed by #1095
Closed
2 tasks done

Update Ruff to 0.287 or later #769

tlento opened this issue Sep 7, 2023 · 0 comments · Fixed by #1095

Comments

@tlento
Copy link
Contributor

tlento commented Sep 7, 2023

Is this a new bug in metricflow?

  • I believe this is a new bug in metricflow
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

Users of the Ruff VSCode extension are now seeing huge numbers of "false positive" lint warnings for docstring errors. All of these have been tagged with # noqa: D.

The issue seems to be a change in how Ruff interprets those codes, which rolled out sometime between 0.264 and 0.285. This popped up because the most recent versions of the VSCode extension are on 0.285, but these errors do not fire in our pre-commit runs either in CI or via make lint since that Ruff version is pinned to 0.260.

For now, VSCode users can get compatible behavior by installing an earlier version of Ruff (v2023.14.0 appears to be just fine), but we should get this updated.

Note fixing this requires a lot of changes to docstring lint check overrides:

  40 D101
 685 D102
 222 D103
  39 D105
   3 D106
  69 D107

Anyone who takes this on should probably suppress those errors at first and then re-enable one by one after a big fix. D102, in particular, probably warrants a global find/replace.

Also worth noting, it's likely a lot of these can be resolved by removing the noqa and adding an @OverRide decorator to the offending method.

Expected Behavior

Ideally, Ruff in the command line and CI and Ruff in VSCode would have matching results.

Steps To Reproduce

Update Ruff, run the CLI, observe the errors. VSCode users with the most recent Ruff extension can see them, just tons of yellow squiggles everywhere....

Relevant log output

No response

Environment

- OS:
- Python:
- dbt:
- metricflow:

Which database are you using?

No response

Additional Context

No response

@tlento tlento linked a pull request Mar 21, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants