Comments (5)
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.
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.
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.
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.
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)
- Can't get the actual complexity for block of code HOT 1
- Installing radon breaks flake8 HOT 8
- Support of pyproject.toml file HOT 1
- Radon struggles to collect statistics from large files HOT 2
- Is Randon able to run into Java files? HOT 2
- [feature] Add support for pre-commit HOT 5
- Python 3.10: match-case syntax not yet supported by radon? HOT 1
- summary not shown when using --json flag HOT 3
- 5.1.0: sphinx warnings HOT 2
- Misspelled 'clasification' in markdown exports HOT 1
- Documentation link outdated HOT 2
- wrong complexity for linear function HOT 1
- New release to drop future package HOT 7
- 5.1.0 - wrong import HOT 2
- Support mi/hal in flake8 plugin
- Radon crashes on unrelated config option in pyproject.toml HOT 3
- Add line numbers to Halstead results
- RFE: is it possible to start making github releases?🤔
- Radon can't run when use pytest log fornat: `$()d` HOT 1
- Radon might detect Wget in Python as errors HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from radon.