From a44e0eee18572e81ebeacd0395a8ce8a0674f9d3 Mon Sep 17 00:00:00 2001 From: mattkeanny Date: Mon, 29 Jan 2024 13:48:53 +0000 Subject: [PATCH] restored method signature for family(), added deprecation warning. --- epo_ops/api.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/epo_ops/api.py b/epo_ops/api.py index 903087b..90e1c70 100644 --- a/epo_ops/api.py +++ b/epo_ops/api.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- import logging +import warnings from base64 import b64encode from typing import List, Optional, Union from xml.etree import ElementTree as ET @@ -40,20 +41,29 @@ def family( self, reference_type: str, input: Union[Docdb, Epodoc], + endpoint=None, constituents: Optional[List[str]] = None, - ): + ) -> requests.Response: """ Retrieves the patent numbers of the extended patent family related to the input (INPADOC family). Args: reference_type (str): Any of "publication", "application", or "priority". input (Epodoc or Docdb): The document number. Cannot be Original. + endpoint (optional): None. Not applicable for family service. constituents (list[str], optional): List of 'biblio', 'legal' or both. Defaults to None. Returns: - Response: a requests.Response object + requests.Response: a requests.Response object. """ + if endpoint is not None: + warnings.warn( + "The `endpoint` argument is not used in this context and will be removed.", + DeprecationWarning, + stacklevel=2, + ) + url = self._make_request_url( dict( service=self.__family_path__,