FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [View Raw Code]   [Original HTTPS Page]

codespaces-react/Python Coding Guidelines.md at main · anosriva/codespaces-react · GitHub

Latest commit

 

History

History
19 lines (15 loc) · 537 Bytes

File metadata and controls

19 lines (15 loc) · 537 Bytes

Python Coding Guidelines

1. Code Style

  • Follow PEP 8 for Python coding conventions.
  • Use black for auto-formatting and flake8 for linting.
  • Use type hints (def func(x: int) -> str:).

2. Naming Conventions

  • Variables and functions: snake_case
  • Classes: PascalCase
  • Constants: UPPER_CASE

3. Error Handling

  • Always catch exceptions explicitly.

  • Use logging instead of print() for error tracking.

    import logging
    logging.error("An error occurred")

Back | FazBrowse Home | New Git URL