From c71779588ad5479fbba1472ff72284b76a5ab908 Mon Sep 17 00:00:00 2001 From: MBfromOK Date: Sat, 20 Aug 2022 12:18:53 -0500 Subject: [PATCH] Fix Python 3.8+ Literal Syntax warning --- gitsome/github.py | 2 +- gitsome/lib/html2text/html2text.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gitsome/github.py b/gitsome/github.py index f6fe03b..7c00008 100644 --- a/gitsome/github.py +++ b/gitsome/github.py @@ -791,7 +791,7 @@ def trending(self, language, weekly, monthly, webbrowser.open( ('https://github.com/trending' + ('/developers' if devs else '') + - ('/' + language if language is not 'overall' else '') + + ('/' + language if language != 'overall' else '') + url_param)) else: click.secho( diff --git a/gitsome/lib/html2text/html2text.py b/gitsome/lib/html2text/html2text.py index 77cc927..62c2b31 100644 --- a/gitsome/lib/html2text/html2text.py +++ b/gitsome/lib/html2text/html2text.py @@ -92,8 +92,8 @@ def name2cp(k): def onlywhite(line): """Return true if the line does only consist of whitespace characters.""" for c in line: - if c is not ' ' and c is not ' ': - return c is ' ' + if c != ' ' and c != ' ': + return c == ' ' return line def hn(tag):