-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
conditional import against six.PY2 emits error #3501
Comments
Thanks for the report. The original #769 issue was related to fallback imports, but we should support |
I ran into this issue troubleshooting Linting in Github Actions. At 1st I thought it was an issue with the Python install tk dependency. However I narrowed it down to Test case 1
tk_test.py import sys, six
print(sys.version)
if six.PY2:
import Tkinter as tk
else:
import tkinter as tk
print(tk.TkVersion) # succeeds in all platforms to print version number Test Case 2
import sys
print(sys.version)
try:
import Tkinter as tk
except ImportError:
import tkinter as tk
print(tk.TkVersion) Github Actions Configuration for both tests
|
Closing as it's related to six / python 3 porting so unlikely to get attention, and also because the generic issue seems related to control-flow which has dozen of open issues already. |
Steps to reproduce
Current behavior
Expected behavior
no error reported
pylint --version output
ref: #769
The text was updated successfully, but these errors were encountered: