diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index cf60638..98c83f8 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -4,6 +4,7 @@ name: Test the Python package on: + workflow_dispatch: push: branches: [ master ] pull_request: diff --git a/nameparser/parser.py b/nameparser/parser.py index 2ee146c..bb19fb6 100644 --- a/nameparser/parser.py +++ b/nameparser/parser.py @@ -141,6 +141,9 @@ def __unicode__(self): return self.collapse_whitespace(_s).strip(', ') return " ".join(self) + def __hash__(self): + return hash(str(self)) + def __str__(self): if sys.version_info[0] >= 3: return self.__unicode__()