This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Optional, Union, cast, Literal, NewType, TypeGuard | |
from collections import defaultdict | |
from dataclasses import dataclass | |
@dataclass | |
class Application: | |
id: int | |
parent_id: Optional[int] = None | |
ParentApplication = NewType('ParentApplication', Application) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Optional, Union, cast, Literal, NewType, TypeGuard | |
from collections import defaultdict | |
from dataclasses import dataclass | |
@dataclass | |
class Application: | |
id: int | |
parent_id: Optional[int] = None | |
ParentApplication = NewType('ParentApplication', Application) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Optional, Union, cast, Literal, NewType, TypeGuard | |
from collections import defaultdict | |
from dataclasses import dataclass | |
@dataclass | |
class Application: | |
id: int | |
parent_id: Optional[int] = None | |
ParentApplication = NewType('ParentApplication', Application) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Optional, Union, cast, Literal, NewType, TypeGuard | |
from collections import defaultdict | |
from dataclasses import dataclass | |
@dataclass | |
class Application: | |
id: int | |
parent_id: Optional[int] = None | |
ParentApplication = NewType('ParentApplication', Application) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Optional, Union, cast, Literal, NewType, TypeGuard | |
from collections import defaultdict | |
from dataclasses import dataclass | |
@dataclass | |
class Application: | |
id: int | |
parent_id: Optional[int] = None | |
ParentApplication = NewType('ParentApplication', Application) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections.abc import AsyncIterator, Callable | |
from typing import Any, Callable | |
type TaskGroup = Any | |
create_task_group: Any | |
async def yield_to_start[*A, R]( | |
tg: TaskGroup, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Functions for *walking* the DOM. | |
!!! note | |
For most purposes you would be better off using [query][textual.dom.DOMNode.query], which uses these functions internally. | |
""" | |
from __future__ import annotations |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Any | |
var: tuple[int, ...] | |
fix: tuple[int, int] = var | |
var2: tuple[Any, ...] | |
fix2: tuple[Any, Any] = var2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
StrList = list[str] | |
StrListPair = tuple[StrList, StrList] | |
T = list[StrListPair] | |
result: T = [ | |
(['a', 'b', 'c'], ['d', 'e', 'f', 'g']), | |
(['a', 'b', 'c'], ['d', 'e', 'f', 'g']), | |
(['a', 'b', 'c'], ['d', 'e', 'f', 'g']), | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import * | |
class B(): | |
def f(self) -> Self: | |
return self | |
class C(B): | |
pass | |
class D(B): | |
pass |
NewerOlder