Skip to content

Commit

Permalink
Merge pull request #9 from eliarizzetto/main
Browse files Browse the repository at this point in the history
update openalex.py: support for python ^3.8
  • Loading branch information
ariannamorettj authored Mar 13, 2024
2 parents 016f97a + ec5bc31 commit 574076a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions oc_ds_converter/oc_idmanager/openalex.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ def normalise(self, id_string, include_prefix=False):

oal_string = sub("\0+", "", (sub("\s+", "", oal_string)))

oal_string = oal_string.removeprefix(self._api_works_route)
oal_string = oal_string.removeprefix(self._api_sources_route)
oal_string = oal_string.removeprefix(self._api)
oal_string = oal_string.removeprefix(self._url_id_pref)
oal_string = oal_string.replace(self._api_works_route, '', 1)
oal_string = oal_string.replace(self._api_sources_route, '', 1)
oal_string = oal_string.replace(self._api, '', 1)
oal_string = oal_string.replace(self._url_id_pref, '', 1)

oal_string = oal_string.upper()
return "%s%s" % (
Expand Down

0 comments on commit 574076a

Please sign in to comment.