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

Use more ruff rules #207

Merged
merged 7 commits into from
Mar 4, 2024
Merged

Use more ruff rules #207

merged 7 commits into from
Mar 4, 2024

Conversation

ChrisLovering
Copy link
Member

@ChrisLovering ChrisLovering commented Feb 19, 2024

This updated our ruff config to select all rules, and disable those I thought weren't useful.

The only breaking changes that I can see will affect our repos is the change to in_whitelist_check.

Draft release notes

Breaking Changes

All breaking changes are related to making boolean default and boolean-typed positional arguments in function definition keyword args only. The arg names and functions are listed below.

  • sync_app_commands in pydis_core.BotBase.load_extensions()
  • should_raise in pydis_core.site_api.APIClient.maybe_raise_for_status()
  • fail_silently in pydis_core.utils.checks.in_whitelist_check()
  • All args other than pagination_emojis, lines, ctx, embed in pydis_core.utils.pagination.LinePaginator.paginate()

What's Changed

Full Changelog: v10.7.0...v11.0.0

Copy link

netlify bot commented Feb 19, 2024

Deploy Preview for bot-core ready!

Name Link
🔨 Latest commit c72b515
🔍 Latest deploy log https://app.netlify.com/sites/bot-core/deploys/65e5c2ac083801000850944b
😎 Deploy Preview https://deploy-preview-207--bot-core.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ChrisLovering ChrisLovering force-pushed the Use-more-ruff-rules branch 3 times, most recently from a89af93 to 29a0b14 Compare February 19, 2024 22:04
Copy link
Member

@mbaruh mbaruh left a comment

Choose a reason for hiding this comment

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

The trailing comma rule seems a bit intrusive, and not always relevant (for example after a **kwargs), but otherwise this looks good

@ChrisLovering
Copy link
Member Author

ChrisLovering commented Feb 20, 2024

The trailing comma rule seems a bit intrusive, and not always relevant (for example after a **kwargs), but otherwise this looks good

Yea I can understand that. The linting rule likely makes more sense when used in combination with ruff format / black, as that impacts how they are formatted.

Dropped that commit, and updated the config to ignore that rule.

@ChrisLovering ChrisLovering merged commit c72b515 into main Mar 4, 2024
8 checks passed
@ChrisLovering ChrisLovering deleted the Use-more-ruff-rules branch March 4, 2024 14:51
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.

3 participants