Sanic: Remove unwanted None check for __repr__ in `Request` class

Created on 2 Jan 2019  路  1Comment  路  Source: sanic-org/sanic

Description

The current implementation of the Request class provided by sanic has a __repr__ method that performs an unnecessary None check on method and path and there it is not possible that they can be None. We can remove these condition checks and have a much simpler __repr__ implementation.

Reference

  1. __repr__ implementation
  2. Community Discussion Thread
beginner enhancement help wanted

Most helpful comment

>All comments

Was this page helpful?
0 / 5 - 0 ratings