From 748f4e7b813ac0ed41725c1ed052eed489be8030 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sun, 19 Sep 2021 22:16:36 +0200 Subject: [PATCH 1/2] Fix LGTM.com recommendation: Testing equality to None Testing for None should use the 'is' operator. --- pep2html.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pep2html.py b/pep2html.py index 4ab5cf8dfab..31cdfaeed74 100755 --- a/pep2html.py +++ b/pep2html.py @@ -538,7 +538,7 @@ def make_html(inpath, verbose=0): % (inpath, pep_type)), file=sys.stderr) sys.stdout.flush() return None - elif PEP_TYPE_DISPATCH[pep_type] == None: + elif PEP_TYPE_DISPATCH[pep_type] is None: pep_type_error(inpath, pep_type) return None outpath = os.path.splitext(inpath)[0] + ".html" From 73a2155c09ea2bdb293a42db2ce29e814717318c Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sun, 19 Sep 2021 22:18:13 +0200 Subject: [PATCH 2/2] Fix LGTM.com recommendation: Unused import Import of 'misc' is not used. Import of 'references' is not used. --- pep2html.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pep2html.py b/pep2html.py index 31cdfaeed74..9a2b666f0d7 100755 --- a/pep2html.py +++ b/pep2html.py @@ -52,7 +52,7 @@ from docutils import core, nodes, utils from docutils.readers import standalone -from docutils.transforms import peps, references, misc, frontmatter, Transform +from docutils.transforms import peps, frontmatter, Transform from docutils.parsers import rst class DataError(Exception):