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

[pre-commit.ci] pre-commit autoupdate #2997

Merged
merged 2 commits into from
May 7, 2024
Merged

Conversation

pre-commit-ci[bot]
Copy link
Contributor

@pre-commit-ci pre-commit-ci bot commented May 6, 2024

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.4.2 → v0.4.3](astral-sh/ruff-pre-commit@v0.4.2...v0.4.3)
Copy link

codecov bot commented May 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.63%. Comparing base (1bb98ae) to head (25995e1).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2997   +/-   ##
=======================================
  Coverage   99.63%   99.63%           
=======================================
  Files         117      117           
  Lines       17593    17593           
  Branches     3173     3173           
=======================================
  Hits        17528    17528           
  Misses         46       46           
  Partials       19       19           
Files Coverage Δ
src/trio/_abc.py 100.00% <100.00%> (ø)

@CoolCat467
Copy link
Contributor

Interesting new error:

src/trio/_abc.py:71:7: B024 `Instrument` is an abstract base class, but it has no abstract methods

@A5rocks
Copy link
Contributor

A5rocks commented May 7, 2024

I think we should silence the lint. It's conceptually an abstract base class and therefore is documented as if it is one.

(Maybe just at that one line. I can imagine scenarios where the lint being tripped is a sign of a bad change.)

@CoolCat467 CoolCat467 added the dependencies Pull requests that update a dependency file label May 7, 2024
@CoolCat467 CoolCat467 requested a review from A5rocks May 7, 2024 01:43
@CoolCat467 CoolCat467 enabled auto-merge (squash) May 7, 2024 01:47
@CoolCat467 CoolCat467 merged commit 7dbbac9 into master May 7, 2024
51 checks passed
@CoolCat467 CoolCat467 deleted the pre-commit-ci-update-config branch May 7, 2024 01:50
@jakkdl
Copy link
Member

jakkdl commented May 8, 2024

Interesting new error:

src/trio/_abc.py:71:7: B024 `Instrument` is an abstract base class, but it has no abstract methods

Ooh, I'm the author of that one in flake8-bugbear! But yeah it has a bunch of known false positives, this being one of them: a class never meant to be instantiated, but subclasses don't have to override any of its methods.

It looks like ruff's description is much more assertive:

Why is this bad?

Abstract base classes are used to define interfaces. If they have no abstract methods, they are not useful.

If the class is not meant to be used as an interface, it should not be an abstract base class. Remove the ABC base class from the class definition, or add an abstract method to the class.

than the original description in flake8-bugbear:

B024: Abstract base class has methods, but none of them are abstract. This is not necessarily an error, but you might have forgotten to add the @abstractmethod decorator, potentially in conjunction with @classmethod, @property and/or @staticmethod.

I'll go open an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants