django / daphne

Django Channels HTTP/WebSocket server
BSD 3-Clause "New" or "Revised" License
2.37k stars 266 forks source link

refact(daphne/access.py): AccessLogGenerator refactor #475

Closed valerii-chirkov closed 1 year ago

valerii-chirkov commented 1 year ago
  1. Used f-strings to make the code more concise and readable
  2. Used the get method to get default values for status and length
  3. Refactored the code to remove redundant code
  4. Changed the order of the parameters of the write_entry method to match the order of the format string
  5. Added default values to the parameters of the write_entry method to simplify the calls to it