sourcery icon indicating copy to clipboard operation
sourcery copied to clipboard

Chained len statements

Open adbar opened this issue 4 years ago • 0 comments

Issue description or question

I recently let the GitHub bot write a PR. There are some things the bot missed when it comes to the len() statements, I'd like to suggest the following enhancements:

  • if len(mystring) > 10 and len(mystring) < 500:if 10 < len(mystring) < 500:
  • if string is not None and len(string) != 0:if string not in (None, ''):

Sourcery Version

0.9.5

Code editor or IDE name and version

GitHub bot.

OS name and version

GitHub bot.

adbar avatar Oct 22 '21 12:10 adbar