Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
willamowius committed Jan 12, 2025
1 parent 01966c2 commit c3d2c84
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions eansearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,12 @@ def barcodeImage(self, ean):
return None
return data[0]["barcode"]

def _quote(self, str):
def _quote(self, param):
if (sys.version_info >= (3,)):
import urllib.parse

Check warning on line 101 in eansearch.py

View check run for this annotation

Codeac.io / Codeac Code Quality

import-outside-toplevel

Import outside toplevel (urllib.parse)
return urllib.parse.quote_plus(str)
else:
import urllib2
return urllib2.quote(str)
return urllib.parse.quote_plus(param)
import urllib2

Check warning on line 103 in eansearch.py

View check run for this annotation

Codeac.io / Codeac Code Quality

import-outside-toplevel

Import outside toplevel (urllib2)
return urllib2.quote(param)

def _urlopen(self, url, tries = 1):
if (sys.version_info >= (3,)):
Expand Down

0 comments on commit c3d2c84

Please sign in to comment.