Giter Site home page Giter Site logo

Comments (5)

mimre25 avatar mimre25 commented on July 18, 2024 1

Ok, I was seeing something, but that code wasn't used - I've opened #488 to remove it, to avoid future bugs 🙂

from flake8-bugbear.

cooperlees avatar cooperlees commented on July 18, 2024 1

This is released and we have dedicated improvements issue. So let's move there.

I yanked 24.1.15 + 24.1.15 due to bugs.

from flake8-bugbear.

cooperlees avatar cooperlees commented on July 18, 2024

Yeah, I think we've all been here.

This sounds good, but I think in general we should just detect if it is a mutable iterable when we see remove in a loop and suggest saving the indexs and then removing them in reverse? Or am I missing something here?

Anyways, in general this sounds good. Feel free to make a POC diff and we can comment on there.

from flake8-bugbear.

mimre25 avatar mimre25 commented on July 18, 2024

I've went with an approach that alerts for any mutations of the loop iterator (eg .remove or del).

PR is in #446

from flake8-bugbear.

mimre25 avatar mimre25 commented on July 18, 2024

FYI: While starting to implement this rule into ruff yesterday I might have found a bug in my initial implementation.

@cooperlees please hold off the release until I verify my suspicion and fix it ~ I'll check this out later today.

from flake8-bugbear.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.