Skip to content

Commit

Permalink
Lint fix for python files
Browse files Browse the repository at this point in the history
  • Loading branch information
padjal committed May 6, 2024
1 parent 33eefdc commit 85914de
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions metrics/getset.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,11 @@ def analyze_method(method: tree.MethodDeclaration) -> tuple[str, int, int] | Non
getter_max_complexity = complexity_result

if (method_type_result == 'setter' and complexity_result > setter_max_complexity):
setter_max_complexity = complexity_result
setter_max_complexity = complexity_result

# with open(metrics, 'a', encoding='utf-8') as m:
# m.write(f'Method name: {method_type_result}; Complexity: {complexity_result}; Branches: {branches_result}\n')


with open(metrics, 'a', encoding='utf-8') as m:
m.write(f'MaxGetterComplexity {getter_max_complexity} The maximum complexity of a getter method\n')
m.write(f'MaxSetterComplexity {setter_max_complexity} The maximum complexity of a setter method\n')
m.write(f'MaxGetterComplexity {getter_max_complexity} The maximum complexity of a getter method\n')
m.write(f'MaxSetterComplexity {setter_max_complexity} The maximum complexity of a setter method\n')
except FileNotFoundError as exception:
message = f"{type(exception).__name__} {str(exception)}: {java}"
sys.exit(message)

0 comments on commit 85914de

Please sign in to comment.