Skip to content

Conversation

@devdanzin
Copy link
Contributor

This PR add a --class_names option to radon hal -f that prefixes method names with their class names.

Before:

> python -m radon hal -f .\radon\visitors.py
[...]
    visit_ClassDef:
        h1: 1
        h2: 2
        N1: 2
        N2: 4
        vocabulary: 3
        length: 6
        calculated_length: 2.0
        volume: 9.509775004326938
        difficulty: 1.0
        effort: 9.509775004326938
        time: 0.5283208335737188
        bugs: 0.003169925001442313

After:

> python -m radon hal -f --class-names .\radon\visitors.py
[...]
    HalsteadVisitor.visit_ClassDef:
        h1: 1
        h2: 2
        N1: 2
        N2: 4
        vocabulary: 3
        length: 6
        calculated_length: 2.0
        volume: 9.509775004326938
        difficulty: 1.0
        effort: 9.509775004326938
        time: 0.5283208335737188
        bugs: 0.003169925001442313

I mistakenly committed to master, then created this branch from it. If that causes issues I can send another PR without commits to master.

Fixes #175.

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.

Feature request: classname with radon hal -f

1 participant