fossasia / pslab-python

Python Library for PSLab Desktop: https://pslab.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Undefined names:

cclauss opened this issue · comments

flake8 testing of https://github.com/fossasia/pslab-python on Python 3.7.1

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./PSL/analyticsClass.py:170:28: F821 undefined name 't'
        vf = self.sineFunc(t, par[0], par[1], par[2], par[3])
                           ^
./PSL/analyticsClass.py:171:21: F821 undefined name 'v'
        diff = sum((v - vf) ** 2) / max(v)
                    ^
./PSL/analyticsClass.py:171:41: F821 undefined name 'v'
        diff = sum((v - vf) ** 2) / max(v)
                                        ^
./PSL/analyticsClass.py:179:32: F821 undefined name 't'
            vf = self.sineFunc(t, par[0], par[1], par[2], par[3])
                               ^
./PSL/analyticsClass.py:180:25: F821 undefined name 'v'
            diff = sum((v - vf) ** 2) / max(v)
                        ^
./PSL/analyticsClass.py:180:45: F821 undefined name 'v'
            diff = sum((v - vf) ** 2) / max(v)
                                            ^
6     F821 undefined name 't'
1

can i try to work upon this issue

This issue can be resolved if we pass 'v' and 't' as a parameter to the sineFit2 function in the file.

Let me work on this.

I added these tests to Travis CI in #112