summaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-07-23 15:32:18 -0700
committerBryan Newbold <bnewbold@robocracy.org>2020-07-23 15:32:21 -0700
commit06d4f13307b1c2591f7f27f56d97d9b463b0e14e (patch)
tree551d1bbcebba4b049547caf73f1a59610f0713ba /python/fatcat_tools
parent578ce63bd17df11d3ca7cd1083feebe4b92e457c (diff)
downloadfatcat-06d4f13307b1c2591f7f27f56d97d9b463b0e14e.tar.gz
fatcat-06d4f13307b1c2591f7f27f56d97d9b463b0e14e.zip
remove isascii() work around definition in importers/datacite.py
We are python3.7 now, so this isn't needed.
Diffstat (limited to 'python/fatcat_tools')
-rw-r--r--python/fatcat_tools/importers/datacite.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/python/fatcat_tools/importers/datacite.py b/python/fatcat_tools/importers/datacite.py
index 50d73798..f93362d6 100644
--- a/python/fatcat_tools/importers/datacite.py
+++ b/python/fatcat_tools/importers/datacite.py
@@ -191,12 +191,6 @@ LICENSE_SLUG_MAP = {
"//spdx.org/licenses/OGL-Canada-2.0.json": "OGL-Canada",
}
-# TODO(martin): drop this after 3.7 upgrade
-try:
- isascii = str.isascii # new in 3.7, https://docs.python.org/3/library/stdtypes.html#str.isascii
-except AttributeError:
- isascii = lambda s: len(s) == len(s.encode())
-
class DataciteImporter(EntityImporter):
"""
@@ -287,7 +281,7 @@ class DataciteImporter(EntityImporter):
print('skipping record without a DOI', file=sys.stderr)
return
- if not isascii(doi):
+ if not str.isascii(doi):
print('[{}] skipping non-ascii doi for now'.format(doi))
return None