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

Related issues

ijl picture ijl  路  25Comments

nszceta picture nszceta  路  23Comments

harshanarayana picture harshanarayana  路  26Comments

ldmarz picture ldmarz  路  26Comments

channelcat picture channelcat  路  22Comments