DEV Community

Nantipat
Nantipat

Posted on

บันทึกการ setup Python ให้มันเขียนได้ใน VSCODE

Screenshot_1

บทความนี้เขียนเพื่อบันทึกการ setup Python ของผมเองถ้าใครมีวิธีดีกว่านี้ก็ช่วยบอกหน่อยเถอะ

ลง extension นี้ใน vscode
Screenshot_17

ctrl+ship+p
เลือก Select Linter

Screenshot_18

เลือก pylint (มีมาตรฐานอื่นๆด้วย)

ตรงนี้สั้นๆ

Pylint เป็นเครื่องมือหนึ่งใน Python ใช้สำหรับตรวจสอบคุณภาพและประสิทธิภาพของโค้ด Python ที่เขียน ว่ามีคุณภาพอยู่ในระดับใด โดยอ้างอิงตามหลัก PEP 8 ของ Python

จริงก็มีเครื่องมืออื่นๆแหละแต่ไม่ได้ลองใช้ที

อ่านต่อที่บทความนี้ได้
https://kuma-cheatsheet.github.io/python/PyLint/

ลง PEP 8

pip install --upgrade autopep8
Enter fullscreen mode Exit fullscreen mode

python มันใช้ interpreter แล้วถ้าเราจัด indent ไม่ดีมันก็ไม่ให้เราผ่าน
เวลา copy paste ก็เสียเวลาจัด ผมเลยใช้เจ้านี้แก้ปัญหา

Screenshot_19

บวกกับอยากรัน code เร็วๆ ใช้เจ้านี้ช่วยScreenshot_20

อย่าลืมที่จะตั้ง key ลัดหล่ะ

Screenshot_9

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

While many AI coding tools operate as simple command-response systems, Qodo Gen 1.0 represents the next generation: autonomous, multi-step problem-solving agents that work alongside you.

Read full post

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay