From 755569b57ba595f555db289a2fbc9b1e3cb358cf Mon Sep 17 00:00:00 2001 From: Renato Lima Date: Wed, 10 Mar 2021 15:17:17 -0300 Subject: [PATCH] Replaced Pygount source analysis deprecation method --- module_analysis/models/ir_module_module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module_analysis/models/ir_module_module.py b/module_analysis/models/ir_module_module.py index b59dc299b..bf16697f8 100644 --- a/module_analysis/models/ir_module_module.py +++ b/module_analysis/models/ir_module_module.py @@ -3,7 +3,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). import os -import pygount +from pygount import SourceAnalysis from pathlib import Path import logging @@ -145,7 +145,7 @@ class IrModuleModule(models.Model): exclude_files) for file_path, file_ext in file_list: - file_res = pygount.source_analysis( + file_res = SourceAnalysis.from_file( file_path, '', encoding=self._get_module_encoding(file_ext)) for k, v in analysed_datas.get(file_ext).items():