|
12 | 12 | # See the License for the specific language governing permissions and |
13 | 13 | # limitations under the License. |
14 | 14 |
|
15 | | -from typing import Any, List, Optional, Protocol, TYPE_CHECKING |
16 | | -from warnings import deprecated |
| 15 | +from typing import Any, List, Optional, Protocol |
17 | 16 |
|
18 | 17 |
|
19 | 18 | class CanExecuteScripts(Protocol): |
20 | | - def execute_script(self, script: str, *args: Any) -> Any: ... |
| 19 | + def pin_script(self, script: str, script_key: Optional[Any] = None) -> Any: ... |
21 | 20 |
|
22 | | - # TODO: remove `if not TYPE_CHECKING` guard after properly implement them |
23 | | - # The use of these methods will produce DeprecationWarnings at runtime |
24 | | - if not TYPE_CHECKING: |
25 | | - @deprecated("pin_script is deprecated for removal") |
26 | | - def pin_script(self, script: str, script_key: Optional[Any] = None) -> Any: ... |
| 21 | + def unpin(self, script_key: Any) -> None: ... |
27 | 22 |
|
28 | | - @deprecated("unpin is deprecated for removal") |
29 | | - def unpin(self, script_key: Any) -> None: ... |
| 23 | + def get_pinned_scripts(self) -> List[str]: ... |
30 | 24 |
|
31 | | - @deprecated("get_pinned_scripts is deprecated for removal") |
32 | | - def get_pinned_scripts(self) -> List[str]: ... |
| 25 | + def execute_script(self, script: str, *args: Any) -> Any: ... |
33 | 26 |
|
34 | | - @deprecated("execute_async_script is deprecated for removal") |
35 | | - def execute_async_script(self, script: str, *args: Any) -> Any: ... |
| 27 | + def execute_async_script(self, script: str, *args: Any) -> Any: ... |
0 commit comments