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

Remove ruff config excludes #970

Merged
merged 8 commits into from
Sep 3, 2023

Conversation

hillairet
Copy link
Contributor

Fix: #968

So I removed all the ignores of specific errors and the exclude of loguru/__init__.pyi

  • For loguru/__init__.pyi I just added noqa: N805 (thanks for the detailed explanation @Delgan )
  • For B018, it was on a bunch of 1 / 0 in the tests so I added noqa: B018
  • For B028, I made added stacklevel=1 which is the default value but bugbear wants this to be explicit. So no change of behavior expected.
  • For B033, it was simply a duplicated entry in a set in tests/test_filesink_retention.py so I removed the duplicate.
  • ⚠️ For B904, I added a from clause because the code was reraising an exception without it. That one needs your review @Delgan!

loguru/_logger.py Outdated Show resolved Hide resolved
loguru/_logger.py Outdated Show resolved Hide resolved
@Delgan Delgan merged commit 901dc33 into Delgan:master Sep 3, 2023
15 checks passed
@Delgan
Copy link
Owner

Delgan commented Sep 3, 2023

This is perfect, I'm really glad to see all these code smells addressed!
Thanks a lot for your work and all the details. 👍

@hillairet hillairet deleted the remove-ruff-config-exclude branch September 3, 2023 13:08
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.

Resolve the new BXXX that appeared when switching to ruff
2 participants