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

Upgrade configuration for Ruff v0.2.0 #19544

Closed
wants to merge 1 commit into from
Closed

Upgrade configuration for Ruff v0.2.0 #19544

wants to merge 1 commit into from

Conversation

charliermarsh
Copy link
Contributor

This PR upgrades Dagster's configuration to avoid deprecation warnings that will appear after upgrading to Ruff's upcoming v0.2.0 release. (All these changes work with v0.1.7 as-is.)

@@ -26,7 +28,7 @@ extend-ignore = [
"TCH",
]

[tool.ruff.isort]
[tool.ruff.lint.isort]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Linter settings are in general now under tool.ruff.lint, with settings that are shared between Ruff's linter and formatter at the top-level (tool.ruff). So this is all just moving settings around between those sections as appropriate.

fd.write(
"result_backend = '{result_backend}'\n".format(
result_backend=str(validated_config["backend"])
)
)
if "config_source" in validated_config and validated_config["config_source"]:
if validated_config.get("config_source"):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are violations for an existing rule that Dagster has enabled, but whose scope was extended in a later release. So this just avoids violations showing up after you upgrade.

@alangenfeld
Copy link
Member

nice, thanks!

@smackesey
Copy link
Collaborator

Thanks @charliermarsh-- it's easier to do this according to some existing internal norms for linter update PRs, so I'm going to close in favor of this PR, but this was helpful in getting it right!

@smackesey smackesey closed this Feb 5, 2024
@charliermarsh
Copy link
Contributor Author

@smackesey - No prob at all, goal was just to make the upgrade easier for you all so as long as it was somewhat helpful I'm happy.

@charliermarsh charliermarsh deleted the charlie/ruff branch February 5, 2024 17:04
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