當前位置: 首頁>>代碼示例>>Python>>正文


Python deprecated.deprecated方法代碼示例

本文整理匯總了Python中deprecated.deprecated方法的典型用法代碼示例。如果您正苦於以下問題:Python deprecated.deprecated方法的具體用法?Python deprecated.deprecated怎麽用?Python deprecated.deprecated使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在deprecated的用法示例。


在下文中一共展示了deprecated.deprecated方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: download_results

# 需要導入模塊: import deprecated [as 別名]
# 或者: from deprecated import deprecated [as 別名]
def download_results(self, target: Union[str, Path] = None) -> Dict[Path, dict]:
        """
        Download job results into given folder (current working dir by default).

        The names of the files are taken directly from the backend.

        :param target: String/path, folder where to put the result files.
        :return: file_list: Dict containing the downloaded file path as value and asset metadata
        """
        target = Path(target or Path.cwd())
        if target.exists() and not target.is_dir():
            raise OpenEoClientException("The target argument must be a folder. Got {t!r}".format(t=str(target)))

        assets = {target / f: m for (f, m) in self._download_get_assets().items()}
        if len(assets) == 0:
            raise OpenEoClientException("Expected at least one result file to download, but got 0.")

        for path, metadata in assets.items():
            self._download_url(metadata["href"], path)

        return assets

    # TODO: All below methods are deprecated (at least not specified in the coreAPI) 
開發者ID:Open-EO,項目名稱:openeo-python-client,代碼行數:25,代碼來源:job.py

示例2: stretch_colors

# 需要導入模塊: import deprecated [as 別名]
# 或者: from deprecated import deprecated [as 別名]
def stretch_colors(self, min, max) -> 'DataCube':
        """ Color stretching
        deprecated, use 'linear_scale_range' instead

            :param min: Minimum value
            :param max: Maximum value
            :return: a DataCube instance
        """
        process_id = 'stretch_colors'
        args = {
            'data': THIS,
            'min': min,
            'max': max
        }

        return self.process(process_id, args) 
開發者ID:Open-EO,項目名稱:openeo-python-client,代碼行數:18,代碼來源:datacube.py

示例3: stretch_colors

# 需要導入模塊: import deprecated [as 別名]
# 或者: from deprecated import deprecated [as 別名]
def stretch_colors(self, min, max) -> 'ImageCollection':
        """ Color stretching
        deprecated, use 'linear_scale_range' instead

            :param min: Minimum value
            :param max: Maximum value
            :return: An ImageCollection instance
        """
        process_id = 'stretch_colors'
        args = {
                'data': {'from_node': self.node_id},
                'min': min,
                'max': max
            }

        return self.graph_add_process(process_id, args) 
開發者ID:Open-EO,項目名稱:openeo-python-client,代碼行數:18,代碼來源:imagecollectionclient.py

示例4: connect_usb

# 需要導入模塊: import deprecated [as 別名]
# 或者: from deprecated import deprecated [as 別名]
def connect_usb(serial: Optional[str] = None, init: bool=False) -> Device:
    """
    Args:
        serial (str): android device serial

    Returns:
        Device

    Raises:
        ConnectError
    """
    if init:
        logger.warning("connect_usb, args init=True is deprecated since 2.8.0")

    if not serial:
        device = adbutils.adb.device()
        serial = device.serial
    return Device(serial) 
開發者ID:openatx,項目名稱:uiautomator2,代碼行數:20,代碼來源:__init__.py

示例5: authenticate_OIDC

# 需要導入模塊: import deprecated [as 別名]
# 或者: from deprecated import deprecated [as 別名]
def authenticate_OIDC(
            self, client_id: str,
            provider_id: str = None,
            webbrowser_open=None,
            timeout=120,
            server_address: Tuple[str, int] = None
    ) -> 'Connection':
        """
        Authenticates a user to the backend using OpenID Connect.

        :param client_id: Client id to use for OpenID Connect authentication
        :param webbrowser_open: optional handler for the initial OAuth authentication request
            (opens a webbrowser by default)
        :param timeout: number of seconds after which to abort the authentication procedure
        :param server_address: optional tuple (hostname, port_number) to serve the OAuth redirect callback on

        TODO: deprecated?
        """
        # TODO: option to increase log level temporarily?
        provider_id, provider = self._get_oidc_provider(provider_id)

        client_info = OidcClientInfo(client_id=client_id, provider=provider)
        authenticator = OidcAuthCodePkceAuthenticator(
            client_info=client_info,
            webbrowser_open=webbrowser_open,
            timeout=timeout,
            server_address=server_address,
        )
        return self._authenticate_oidc(authenticator, provider_id=provider_id) 
開發者ID:Open-EO,項目名稱:openeo-python-client,代碼行數:31,代碼來源:connection.py

示例6: click_post_delay

# 需要導入模塊: import deprecated [as 別名]
# 或者: from deprecated import deprecated [as 別名]
def click_post_delay(self):
        """ Deprecated or not deprecated, this is a question """
        return self.settings['post_delay'] 
開發者ID:openatx,項目名稱:uiautomator2,代碼行數:5,代碼來源:__init__.py

示例7: deprecate_and_set_removal

# 需要導入模塊: import deprecated [as 別名]
# 或者: from deprecated import deprecated [as 別名]
def deprecate_and_set_removal(since, remove_in, message):
    return deprecated(
        version=since, reason=f"will be removed in {remove_in}: {message}"
    ) 
開發者ID:packit-service,項目名稱:ogr,代碼行數:6,代碼來源:deprecation.py


注:本文中的deprecated.deprecated方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。