Git Product home page Git Product logo

Comments (5)

rubik avatar rubik commented on June 11, 2024

Mhmm it seems fair. How do you propose to call it? --no-asserts / --no-assert / --exclude-assert? I tend to dislike the last one because it starts like another option which is already present. Also I'm not sure if this option would need a short flag too. It does not seem very common.

from radon.

javierj avatar javierj commented on June 11, 2024

It seems two good choices. Maybe "–avoid-assert" could be an option too, but I think the first ones are best.
I was thinking in –O, but it won’t be a good idea. The –O option doesn’t mean avoiding assertion statements, but optimizing the code (although the only optimization is to avoid asserts).

from radon.

rubik avatar rubik commented on June 11, 2024

Yeah, I thought about -O as well, but I excluded it. So I'll go with --no-assert, which seems the most intuitive and obvious to me.

from radon.

astrojuanlu avatar astrojuanlu commented on June 11, 2024

I think a --no-assert option would be perfect.

As an aside, I'd like to add that with the current situation, using plain assert in the unit tests would increment the CC but using, for example, assertEqual -like methods from common unit testing frameworks would not. For me, that's another reason to provide --no-assert.

from radon.

rubik avatar rubik commented on June 11, 2024

That's because a plain assert is a statement, while assertEqual is a function. So the complexity gets hidden inside it.

from radon.

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.