当前位置: 首页>>代码示例>>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;未经允许,请勿转载。