Closed rvanlaar closed 4 years ago
This is occurring because you have a file named copy.py
in your project which is shadowing the copy
module from Python's standard library. Please rename that file and the issue should go away.
Indeed, I do have a file named copy.py in my directory.
What a strange way of closing an issue. You point to a solution without seeing the problems it raised.
1) There wasn't any error shown that there was an error formatting, 2) The CWD (current working directory) shouldn't have been inside my package and 3) I can't go about renaming every file because it clashes with a python package name.
So please reconsider opening this issue and work towards a fix so others don't have to hunt this down.
Environment data
"python.jediEnabled"
set to; more info #3977): JediExpected behaviour
YAPF formats the file
Actual behaviour
Yapf doesn't format the file, and doesn't show error messages.
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
; turn on source maps to make any tracebacks be useful by runningEnable source map support for extension debugging
)Running this command on the terminal results in the following traceback:
This doesn't happen when the command is run in the project root directory.