tamarott / SinGAN

Official pytorch implementation of the paper: "SinGAN: Learning a Generative Model from a Single Natural Image"
https://tamarott.github.io/SinGAN.htm
Other
3.31k stars 611 forks source link

Undefined name: `path` in _compute_statistics_of_path() #90

Open cclauss opened 4 years ago

cclauss commented 4 years ago

https://github.com/tamarott/SinGAN/blob/master/SIFID/sifid_score.py#L208-L219

flake8 testing of https://github.com/tamarott/SinGAN on Python 3.8.1

$ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics

./SIFID/sifid_score.py:209:8: F821 undefined name 'path'
    if path.endswith('.npz'):
       ^
./SIFID/sifid_score.py:210:21: F821 undefined name 'path'
        f = np.load(path)
                    ^
./SIFID/sifid_score.py:214:29: F821 undefined name 'path'
        path = pathlib.Path(path)
                            ^
3     F821 undefined name 'path'
3

https://flake8.pycqa.org/en/latest/user/error-codes.html

On the flake8 test selection, this PR does not focus on "style violations" (the majority of flake8 error codes that psf/black can autocorrect). Instead these tests are focus on runtime safety and correctness: