Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined name 'uri' in smart_open_lib.py #213

Closed
cclauss opened this issue Aug 6, 2018 · 1 comment
Closed

Undefined name 'uri' in smart_open_lib.py #213

cclauss opened this issue Aug 6, 2018 · 1 comment

Comments

@cclauss
Copy link
Contributor

cclauss commented Aug 6, 2018

flake8 testing of https://github.com/RaRe-Technologies/smart_open on Python 3.7.0

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

./smart_open/smart_open_lib.py:438:53: F821 undefined name 'uri'
        raise RuntimeError("invalid HDFS URI: %s" % uri)
                                                    ^
./smart_open/smart_open_lib.py:448:56: F821 undefined name 'uri'
        raise RuntimeError("invalid WebHDFS URI: %s" % uri)
                                                       ^
./smart_open/smart_open_lib.py:505:53: F821 undefined name 'uri'
        raise RuntimeError("invalid file URI: %s" % uri)
                                                    ^
3     F821 undefined name 'uri'
3
cclauss pushed a commit to cclauss/smart_open that referenced this issue Aug 7, 2018
Fixes piskvorky#213

__NameError__s would be raised in these instances instead of the intended __RuntimeError__s because __uri__ is an _undefined name_ in these contexts.
@menshikh-iv
Copy link
Contributor

Good catch @cclauss, thanks for the report!

menshikh-iv pushed a commit that referenced this issue Aug 7, 2018
Fixes #213

__NameError__s would be raised in these instances instead of the intended __RuntimeError__s because __uri__ is an _undefined name_ in these contexts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants