-
Notifications
You must be signed in to change notification settings - Fork 37
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
not working black formatter #551
Comments
@Ravindu121212 when you say it does not work, do you see any errors in Output> Black formatter logs? |
2024-12-22 10:19:29.519 [info] [Warn - 10:19:29 AM] Skipping non python code or code with syntax errors: c:\coding\python.vscode\hello.py |
format gonna work for js file |
Black formatter can only format Python files and if there are no syntax errors. Can you share the content of your file? |
def greet(name: str) -> str:
"""Greet the user with a friendly message."""
return f"Hello, {name}! Welcome to the world of Python."
def add_numbers(a: int, b: int) -> int:
"""Add two numbers and return the result."""
return a + b
if __name__ == "__main__":
# Greet the user
name = input("Enter your name: ")
print(greet(name))
# Add two numbers
num1 = int(input("Enter the first number: "))
num2 = int(input("Enter the second number: "))
result = add_numbers(num1, num2)
print(f"The sum of {num1} and {num2} is {result}.") |
give me a solution |
Type: Performance Issue
I install black formatter perfectly but it doesn't work for python file.
Extension version: 2024.4.0
VS Code version: Code 1.96.2 (fabdb6a30b49f79a7aba0f2ad9df9b399473380f, 2024-12-19T10:22:47.216Z)
OS version: Windows_NT x64 10.0.19045
Modes:
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Process Info
Workspace Info
A/B Experiments
The text was updated successfully, but these errors were encountered: