未验证 提交 626c422c 编写于 作者: C cclauss 提交者: GitHub

Undefined name: 'f' --> 'path'

__f__ is an _undefined name_ in this context but __path__ is an unused function parameter on the line above.

[flake8](http://flake8.pycqa.org) testing of https://github.com/facebookresearch/VideoPose3D on Python 3.7.1

$ __flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics__
```
./data/data_utils.py:91:20: F821 undefined name 'f'
    with h5py.File(f) as hf:
                   ^
1     F821 undefined name 'f'
1
```
上级 8b1ed17d
......@@ -88,7 +88,7 @@ def import_cpn_poses(path):
def import_sh_poses(path):
with h5py.File(f) as hf:
with h5py.File(path) as hf:
positions = hf['poses'].value
return positions.astype('float32')
......@@ -99,4 +99,4 @@ def suggest_pose_importer(name):
return import_cpn_poses
if 'sh' in name:
return import_sh_poses
raise KeyError('Cannot infer keypoint format from name "{}". Tried detectron, cpn, sh.'.format(name))
\ No newline at end of file
raise KeyError('Cannot infer keypoint format from name "{}". Tried detectron, cpn, sh.'.format(name))
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册