Closed ethanchewy closed 5 years ago
Hi, I'd like to take this if no one else has yet
So while taking the video, I notice a situation in which I fix the error/warning of 'redefined-outer-name', 'undefined-variable', and the written warning goes away. However, the small x symbol next to the line does not. I'm not sure if this is a bug or issue thats known. I didn't see it in the list
@gurjy0t Yeah, so in the example:
def foo(bar, baz):
pass
foo(42, 42)
it is supposed to have warnings for line 1 since both of the parameters are not used in the body of the function. So, this is indeed correct and there is no bug. But thank you for bringing this up!
I also double checked and copy and pasted it in a seperate python file and manually pylint and got the same warnings so this is intended:
ethanc@ethanc-Q325UAR:/tmp$ pylint tmpt4jxs4jd
************* Module tmpt4jxs4jd
tmpt4jxs4jd:1:0: C0111: Missing module docstring (missing-docstring)
tmpt4jxs4jd:1:0: C0102: Black listed name "foo" (blacklisted-name)
tmpt4jxs4jd:1:0: C0102: Black listed name "bar" (blacklisted-name)
tmpt4jxs4jd:1:0: C0102: Black listed name "baz" (blacklisted-name)
tmpt4jxs4jd:1:0: C0111: Missing function docstring (missing-docstring)
tmpt4jxs4jd:1:8: W0613: Unused argument 'bar' (unused-argument)
tmpt4jxs4jd:1:13: W0613: Unused argument 'baz' (unused-argument)
---------------------------------------------------------------------
Your code has been rated at -13.33/10 (previous run: 3.33/10, -16.67)
If you want, you can use another example for the gif like example number 1 (just press the 1).
Hi, let me clarify. I was trying the example at the very top of read me. The one that defines x outside the scope of foo() and then attempts to modify it inside foo. During the process of duplicating that behaviour I saw this:
Define x outside scope -> see red x and errors listed below text box Define scope inside x -> Error below text box resolve however red x still exists.
I can put up screenshots later if you want. I can ignore it aswell. It just seems like the demo is suppose to show the error/warning go away by moving the x=10
line into foo().
Lmk if otherwise. Or if you need more info
Weird, I don't get the same issue when I replicate. Can you please upload some screenshots? Thanks
I don't get any sidebar icons at all :( Tried in Firefox and Edge with latest PythonBuddy and Python 3.7.0.
@DirtySoc Weird. I tested it in Firefox and Chrome and PythonBuddy didn't have any issues.
Maybe this has to do with how you set up virtualenv or Python?
Can you double check your virtualenv settings?
Can you copy and comment below the list of packages installed by running the command pip list
?
@DirtySoc Could you also inspect element and load up the console (https://developer.mozilla.org/en-US/docs/Tools/Web_Console/Opening_the_Web_Console) and copy any of the error messages and paste it over here?
@ethanchewy I setup according to the README. Here are screenshots of "Inspect Element" on the gutter and the console log on a page refresh.
PS C:\Users\USER\Documents\repos\PythonBuddy> C:\Users\USER\.envs\PythonBuddy_venv\Scripts\Activate.ps1
(PythonBuddy_venv) PS C:\Users\USER\Documents\repos\PythonBuddy> python -m pip list
Package Version
----------------- -------
astroid 2.0.4
click 6.7
colorama 0.4.0
dnspython 1.15.0
eventlet 0.24.1
Flask 1.0.2
Flask-SocketIO 3.0.2
greenlet 0.4.15
isort 4.3.4
itsdangerous 0.24
Jinja2 2.10
lazy-object-proxy 1.3.1
MarkupSafe 1.0
mccabe 0.6.1
monotonic 1.5
pip 18.1
pylint 2.1.1
python-engineio 2.2.0
python-socketio 2.0.0
setuptools 39.0.1
six 1.11.0
typed-ast 1.1.0
Werkzeug 0.14.1
wrapt 1.10.11
@DirtySoc Did you create a new virtualenv and is it in Python 3?
If you follow the README, you should get this for pip list
:
(venv) ethanc@ethanc-Q325UAR:~/PythonBuddy$ pip list
Package Version
----------------- -------
astroid 2.0.4
click 6.7
dnspython 1.15.0
eventlet 0.24.1
Flask 1.0.2
Flask-SocketIO 3.0.2
greenlet 0.4.15
isort 4.3.4
itsdangerous 0.24
Jinja2 2.10
lazy-object-proxy 1.3.1
MarkupSafe 1.0
mccabe 0.6.1
monotonic 1.5
pip 18.0
pylint 2.1.1
python-engineio 2.2.0
python-socketio 2.0.0
setuptools 40.4.1
six 1.11.0
typed-ast 1.1.0
Werkzeug 0.14.1
wheel 0.31.1
wrapt 1.10.11
You are using pip version 18.0, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Also, PythonBuddy has only been tested on Unix systems (Mac, Linux) so that also might be an issues.
Could you press on the error/warning in the console if any and copy and paste it here? So, play around with the editor by typing stuff and running code and see if there are any errors.
I'm gonna try to test this out on my other Windows system later tonight or tomorrow.
Thank you for bringing this up!
I'm pretty sure the issue has to do with how temp files are created on Windows vs. Unix systems and maybe the path setup.
Probably should have tested this on Windows... :P
@ethanchewy you are probably right judging by the way the error lines are reported in the app.
Here is where the 'HTML1506: Unexpected token.' error goes:
@DirtySoc This is perfect. This gives me a lot to work off of.
Thank you so much for bringing this up! I'll work on fixing this issue (https://github.com/ethanchewy/PythonBuddy/issues/29) asap
@DirtySoc Any updates on creating gifs?
Problem:
Goal:
How to do this?