From 708bcbee1684916f1a78e5e48eea2ef16d17aba6 Mon Sep 17 00:00:00 2001 From: dbrakenhoff Date: Tue, 1 Jun 2021 17:21:33 +0200 Subject: [PATCH 1/2] codacy suggestions --- metran/factoranalysis.py | 2 +- metran/kalmanfilter.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/metran/factoranalysis.py b/metran/factoranalysis.py index 01ad91b..571b975 100644 --- a/metran/factoranalysis.py +++ b/metran/factoranalysis.py @@ -80,7 +80,7 @@ def solve(self, oseries): logger.info(msg) if self.maxfactors is not None: nfactors = min(nfactors, self.maxfactors) - except: + except Exception: nfactors = 0 factors = self._minres(correlation, nfactors) diff --git a/metran/kalmanfilter.py b/metran/kalmanfilter.py index b168059..2d2daec 100644 --- a/metran/kalmanfilter.py +++ b/metran/kalmanfilter.py @@ -614,7 +614,7 @@ def set_observations(self, oseries): self.observation_count[t] = len(obsindices) if (len(obsindices) > 0): - for i in range(len(obsindices)): + for i, _ in enumerate(obsindices): obsid = int(obsindices[i]) self.observations[t, obsid] = observation[obsid] self.observation_indices[t, i] = obsid From 728af9a959f3532c143bdede8bb6bd0760019163 Mon Sep 17 00:00:00 2001 From: dbrakenhoff Date: Tue, 1 Jun 2021 17:25:35 +0200 Subject: [PATCH 2/2] update setup.py - remove project_urls --- setup.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/setup.py b/setup.py index e1a1d1c..0155fdf 100644 --- a/setup.py +++ b/setup.py @@ -17,12 +17,6 @@ url='https://github.com/pastas/metran', author='W.L. Berendrecht', author_email='', - project_urls={ - 'Source': 'https://github.com/pastas/metran', - 'Documentation': '', - 'Tracker': 'https://github.com/pastas/metran/issues', - 'Help': '' - }, license='MIT', classifiers=[ 'Development Status :: 4 - Beta',