Skip to content

Commit

Permalink
fixed the code after lint
Browse files Browse the repository at this point in the history
  • Loading branch information
zaqbez39me committed May 18, 2024
1 parent 83f743f commit 24f81fe
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions metrics/ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,9 @@ def nomr(tlist: list[tuple[Any, javalang.tree.ClassDeclaration]]) -> float:
"""Number of methods that are annotated with @Override divided by total number of methods.
:rtype: float
"""
total_methods_number = total_methods(tlist)
if total_methods_number == 0:
if (total_methods_number := total_methods(tlist)) == 0:
return 0
nom_result = nom(tlist)
if nom_result == 0:
if (nom_result := nom(tlist)) == 0:
return 0
return nom_result / total_methods_number

Expand Down

0 comments on commit 24f81fe

Please sign in to comment.