From d7b5fb864cb1e1022dec79f601c2e60e001b36d3 Mon Sep 17 00:00:00 2001 From: Paul Dugas Date: Thu, 28 Oct 2021 07:52:19 -0400 Subject: [PATCH] Fix syntax warning with Python 3 Should resolve this warning. Not sure what the implication is on other versions of Python. ``` /usr/lib/python3/dist-packages/pdfkit/source.py:11: SyntaxWarning: "is" with a literal. Did you mean "=="? if self.type is 'file': ``` --- pdfkit/source.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdfkit/source.py b/pdfkit/source.py index 44ca1bf..133b9ff 100755 --- a/pdfkit/source.py +++ b/pdfkit/source.py @@ -8,7 +8,7 @@ def __init__(self, url_or_file, type_): self.source = url_or_file self.type = type_ - if self.type is 'file': + if self.type is file: self.checkFiles() def isUrl(self):