Try   HackMD

資深 Python 工程師提交的程式碼如何被審查 - Keith Yang

歡迎來到 PyCon TW 2023 共筆

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

共筆入口:https://hackmd.io/@pycontw/2023
手機版請點選上方 按鈕展開議程列表。
Welcome to PyCon TW 2023 Collaborative Writing
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Collaborative Writing Workplace:https://hackmd.io/@pycontw/2023
Using mobile please tap to unfold the agenda.

Collaborative writing start from below
從這裡開始共筆

  1. Six Key Points of Senior Python Code Review
  2. Environment and tool

Six Key Points of Senior Python Code Review

Code Review

  • Quality Assureance
  • Knowledge Sharing
  • Finding and Fixing Bugs Early

提出修改之前,先閱讀過 Python Developer's Guide
https://devguide.python.org/

1st Key Point : Comment

Code Readability

  • 寫出清楚的程式碼 > 寫註解

2nd Key Point : Concise Code

3rd Key Point : Naming

Description for human

Command line Tool : ripgrep

Code & Infra Readablilty
Mark code and module easy to understand > If it's tricky, write comments and doc

python -m this

4th Key Point : Unused Code

Linting tool: ruff, flaske8, pre-commit

5th Key Point : Senior Knew Comment Python Errors

  1. default for func arguments
  2. modifying a list while iterating over it
  3. lambda in for loop.

6th Key Point : PEP8

  • Read the doc?
  • Tools
    • Black, isort
    • flake8, ruff
    • pre-comment

Extra Key Point : Type Hint

Documentation

  • Why to and why not
  • Commit Message
  • Pull-Request

Below is the part that speaker updated the talk/tutorial after speech
講者於演講後有更新或勘誤投影片的部份

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →