Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
connection id: 253219152672480 ---> {
"type": "Charms",
"request": "ResolveCharms",
"version": 7,
"params": {
"macaroon": null,
"resolve": [
{
"reference": "ch:ubuntu",
"charm-origin": {
import logging
PRIME = 17
MASK = 2**64 - 1
def contains(where, what):
logging.debug("%s", [where, what])
sublen = len(what)
if not what:
../charm-analysis/.cache/admission-webhook-operator/tests/integration/test_charm.py:57: await ops_test.model.wait_for_idle(
../charm-analysis/.cache/admission-webhook-operator/tests/integration/test_charm.py:58- apps=["admission-webhook"],
../charm-analysis/.cache/alertmanager-k8s-operator/tests/integration/test_rescale_charm.py:48: await ops_test.model.wait_for_idle(apps=[app_name], status="active", timeout=1000)
../charm-analysis/.cache/alertmanager-k8s-operator/tests/integration/test_rescale_charm.py:49-
--
../charm-analysis/.cache/alertmanager-k8s-operator/tests/integration/test_rescale_charm.py:56: await ops_test.model.wait_for_idle(
../charm-analysis/.cache/alertmanager-k8s-operator/tests/integration/test_rescale_charm.py:57- apps=[app_name], status="active", timeout=1000, wait_for_exact_units=1
--
../charm-analysis/.cache/alertmanager-k8s-operator/tests/integration/test_rescale_charm.py:67: await ops_test.model.wait_for_idle(
../charm-analysis/.cache/alertmanager-k8s-operator/
from typing import Any, Callable, Optional, TypeVar, Tuple, Dict, Protocol
R = TypeVar('R', covariant=True) # Return type of the function
T = TypeVar('T') # Type of instance (for methods)
class FuncProtocol(Protocol[R]):
def __call__(self, *args: Any, **kwargs: Any) -> R: ...
def decorator(
wrapper: Callable[
--- juju/client/schemas-juju-3.1.0.txt 2024-09-25 14:45:35
+++ juju/client/schemas-juju-3.3.0.txt 2024-09-25 14:45:35
@@ -309,6 +309,7 @@
.macaroons[0][0]: Macaroon
.macaroons[0][0]: dict[Any, Any]
.nonce: str
+.token: str
.user-data: str
out: LoginResult
.bakery-discharge-required: Macaroon
This file has been truncated, but you can view the full file.
--- 310.gr.txt 2024-09-25 14:51:09
+++ 330.gr.txt 2024-09-25 14:51:14
@@ -562,6 +562,8 @@
json[2].Schema.definitions.LoginRequest.properties.macaroons.type = "array";
json[2].Schema.definitions.LoginRequest.properties.nonce = {};
json[2].Schema.definitions.LoginRequest.properties.nonce.type = "string";
+json[2].Schema.definitions.LoginRequest.properties.token = {};
+json[2].Schema.definitions.LoginRequest.properties.token.type = "string";
json[2].Schema.definitions.LoginRequest.properties["auth-tag"] = {};
json[2].Schema.definitions.LoginRequest.properties["auth-tag"].type = "string";
@dimaqq
dimaqq / test_main_type_hint.py
Last active August 30, 2024 06:30
Type tests using pyright
from dataclasses import dataclass
from typing import Optional, Protocol, Type
import ops
class CallableWithCharmClassOnly(Protocol):
"""Encapsulate main function type for simple charms.
@dimaqq
dimaqq / test_main_invocations.py
Last active August 30, 2024 06:31
Type tests via custom type guard
import ... # exinsting code
@pytest_fixture
def charm_env(monkeypatch, ...): # existing code
...
from typing import Type, TypeVar, Any, Optional, Callable, Mapping
from typing_extensions import TypeGuard
import inspect