From 315f7e8f22ee6f1ef88b423bfc451b900471df34 Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Sun, 26 Apr 2020 22:18:32 +0200 Subject: [PATCH] [FIX] replace deprecated call to pygount.source_analysis for call of pygount.SourceAnalysis.from_file --- module_analysis/models/ir_module_module.py | 2 +- module_analysis/readme/INSTALL.rst | 2 +- requirements.txt | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/module_analysis/models/ir_module_module.py b/module_analysis/models/ir_module_module.py index bf16697f8..23ce29e79 100644 --- a/module_analysis/models/ir_module_module.py +++ b/module_analysis/models/ir_module_module.py @@ -146,7 +146,7 @@ class IrModuleModule(models.Model): for file_path, file_ext in file_list: file_res = SourceAnalysis.from_file( - file_path, '', + file_path, "", encoding=self._get_module_encoding(file_ext)) for k, v in analysed_datas.get(file_ext).items(): v['value'] += getattr(file_res, k) diff --git a/module_analysis/readme/INSTALL.rst b/module_analysis/readme/INSTALL.rst index 15ecd6f37..2e3cb080b 100644 --- a/module_analysis/readme/INSTALL.rst +++ b/module_analysis/readme/INSTALL.rst @@ -1,3 +1,3 @@ To use this module, you have to install the ``pygount`` python librairy. -``pip install pygount`` +``pip install pygount>1.2.1`` diff --git a/requirements.txt b/requirements.txt index b9c961619..022d96d23 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,5 +3,4 @@ openpyxl xlrd xlwt pysftp -# version 1.2.0 deprecates the API module_analysis uses -pygount<1.2.0 +pygount>1.2.1