From 593d2c44d36d09e24f32ee8a3ce4492320b05092 Mon Sep 17 00:00:00 2001 From: moomoohk Date: Wed, 5 Oct 2022 22:45:34 +0300 Subject: [PATCH 1/2] Make HumanName objects hashable --- nameparser/parser.py | 3 +++ 1 file changed, 3 insertions(+) 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__() From 3ae1f2a7100ed4f7c29b06b682665ff3a9494688 Mon Sep 17 00:00:00 2001 From: moomoohk Date: Wed, 5 Oct 2022 22:51:40 +0300 Subject: [PATCH 2/2] Update python-package.yml --- .github/workflows/python-package.yml | 1 + 1 file changed, 1 insertion(+) 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: