id int64 0 328k | repository_name stringlengths 7 58 | file_path stringlengths 9 302 | class_name stringlengths 5 256 | human_written_code stringlengths 16 2.16M | class_skeleton stringlengths 18 1.49M ⌀ | total_program_units int64 1 1.76k | total_doc_str int64 0 771 | AvgCountLine float64 0 7.89k | AvgCountLineBlank float64 0 297 | AvgCountLineCode float64 0 7.89k | AvgCountLineComment float64 0 7.89k | AvgCyclomatic float64 0 130 | CommentToCodeRatio float64 0 168 | CountClassBase float64 0 40 | CountClassCoupled float64 0 583 | CountClassCoupledModified float64 0 575 | CountClassDerived float64 0 5.35k | CountDeclInstanceMethod float64 0 529 | CountDeclInstanceVariable float64 0 296 | CountDeclMethod float64 0 599 | CountDeclMethodAll float64 0 1.12k | CountLine float64 1 40.4k | CountLineBlank float64 0 8.16k | CountLineCode float64 1 25.7k | CountLineCodeDecl float64 1 8.15k | CountLineCodeExe float64 0 24.2k | CountLineComment float64 0 16.5k | CountStmt float64 1 9.71k | CountStmtDecl float64 1 8.15k | CountStmtExe float64 0 9.69k | MaxCyclomatic float64 0 759 | MaxInheritanceTree float64 0 16 | MaxNesting float64 0 34 | SumCyclomatic float64 0 2.9k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
15,100 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/container.py | pipenv.vendor.tomlkit.container.Container | from pipenv.vendor.tomlkit._utils import merge_dicts
from pipenv.vendor.tomlkit.items import SingleKey
from pipenv.vendor.tomlkit.items import Whitespace
import copy
from pipenv.vendor.tomlkit.items import Trivia
from pipenv.vendor.tomlkit.exceptions import NonExistentKey
from pipenv.vendor.tomlkit.items import item as... |
class Container(_CustomDict):
'''
A container for items within a TOMLDocument.
This class implements the `dict` interface with copy/deepcopy protocol.
'''
def __init__(self, parsed: bool=False) -> None:
pass
@property
def body(self) -> list[tuple[Key | None, Item]]:
pas... | 44 | 11 | 17 | 2 | 14 | 1 | 5 | 0.09 | 1 | 24 | 13 | 1 | 41 | 4 | 41 | 68 | 757 | 143 | 566 | 128 | 514 | 51 | 443 | 117 | 401 | 34 | 2 | 6 | 187 |
15,101 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/container.py | pipenv.vendor.tomlkit.container.OutOfOrderTableProxy | from pipenv.vendor.tomlkit.items import Table
from typing import Any
from typing import Iterator
from pipenv.vendor.tomlkit.items import Key
from pipenv.vendor.tomlkit.items import item as _item
from pipenv.vendor.tomlkit.exceptions import NonExistentKey
from pipenv.vendor.tomlkit._types import _CustomDict
class OutOf... |
class OutOfOrderTableProxy(_CustomDict):
@staticmethod
def validate(container: Container, indices: tuple[int, ...]) -> None:
'''Validate out of order tables in the given container'''
pass
def __init__(self, container: Container, indices: tuple[int, ...]) -> None:
pass
def unw... | 14 | 2 | 8 | 1 | 7 | 0 | 3 | 0.05 | 1 | 11 | 4 | 0 | 10 | 4 | 11 | 38 | 98 | 19 | 75 | 31 | 61 | 4 | 71 | 29 | 59 | 5 | 2 | 4 | 29 |
15,102 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/exceptions.py | pipenv.vendor.tomlkit.exceptions.ConvertError | class ConvertError(TypeError, ValueError, TOMLKitError):
"""Raised when item() fails to convert a value.
It should be a TypeError, but due to historical reasons
it needs to subclass ValueError as well.
""" | class ConvertError(TypeError, ValueError, TOMLKitError):
'''Raised when item() fails to convert a value.
It should be a TypeError, but due to historical reasons
it needs to subclass ValueError as well.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 4 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 5 | 0 | 1 | 1 | 0 | 4 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
15,103 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/exceptions.py | pipenv.vendor.tomlkit.exceptions.EmptyKeyError | class EmptyKeyError(ParseError):
"""
An empty key was found during parsing.
"""
def __init__(self, line: int, col: int) -> None:
message = 'Empty key'
super().__init__(line, col, message=message) | class EmptyKeyError(ParseError):
'''
An empty key was found during parsing.
'''
def __init__(self, line: int, col: int) -> None:
pass | 2 | 1 | 4 | 1 | 3 | 0 | 1 | 0.75 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 15 | 9 | 2 | 4 | 3 | 2 | 3 | 4 | 3 | 2 | 1 | 5 | 0 | 1 |
15,104 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/exceptions.py | pipenv.vendor.tomlkit.exceptions.EmptyTableNameError | class EmptyTableNameError(ParseError):
"""
An empty table name was found during parsing.
"""
def __init__(self, line: int, col: int) -> None:
message = 'Empty table name'
super().__init__(line, col, message=message) | class EmptyTableNameError(ParseError):
'''
An empty table name was found during parsing.
'''
def __init__(self, line: int, col: int) -> None:
pass | 2 | 1 | 4 | 1 | 3 | 0 | 1 | 0.75 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 15 | 9 | 2 | 4 | 3 | 2 | 3 | 4 | 3 | 2 | 1 | 5 | 0 | 1 |
15,105 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/exceptions.py | pipenv.vendor.tomlkit.exceptions.InternalParserError | class InternalParserError(ParseError):
"""
An error that indicates a bug in the parser.
"""
def __init__(self, line: int, col: int, message: str | None=None) -> None:
msg = 'Internal parser error'
if message:
msg += f' ({message})'
super().__init__(line, col, message... | class InternalParserError(ParseError):
'''
An error that indicates a bug in the parser.
'''
def __init__(self, line: int, col: int, message: str | None=None) -> None:
pass | 2 | 1 | 6 | 1 | 5 | 0 | 2 | 0.5 | 1 | 3 | 0 | 0 | 1 | 0 | 1 | 15 | 11 | 2 | 6 | 3 | 4 | 3 | 6 | 3 | 4 | 2 | 5 | 1 | 2 |
15,106 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/exceptions.py | pipenv.vendor.tomlkit.exceptions.InvalidCharInStringError | class InvalidCharInStringError(ParseError):
"""
The string being parsed contains an invalid character.
"""
def __init__(self, line: int, col: int, char: str) -> None:
message = f'Invalid character {char!r} in string'
super().__init__(line, col, message=message) | class InvalidCharInStringError(ParseError):
'''
The string being parsed contains an invalid character.
'''
def __init__(self, line: int, col: int, char: str) -> None:
pass | 2 | 1 | 4 | 1 | 3 | 0 | 1 | 0.75 | 1 | 3 | 0 | 0 | 1 | 0 | 1 | 15 | 9 | 2 | 4 | 3 | 2 | 3 | 4 | 3 | 2 | 1 | 5 | 0 | 1 |
15,107 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/exceptions.py | pipenv.vendor.tomlkit.exceptions.InvalidControlChar | class InvalidControlChar(ParseError):
def __init__(self, line: int, col: int, char: int, type: str) -> None:
display_code = '\\u00'
if char < 16:
display_code += '0'
display_code += hex(char)[2:]
message = f'Control characters (codes less than 0x1f and 0x7f) are not allo... | class InvalidControlChar(ParseError):
def __init__(self, line: int, col: int, char: int, type: str) -> None:
pass | 2 | 0 | 15 | 4 | 11 | 0 | 2 | 0 | 1 | 3 | 0 | 0 | 1 | 0 | 1 | 15 | 16 | 4 | 12 | 4 | 10 | 0 | 8 | 4 | 6 | 2 | 5 | 1 | 2 |
15,108 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/exceptions.py | pipenv.vendor.tomlkit.exceptions.InvalidDateError | class InvalidDateError(ParseError):
"""
A date field was improperly specified.
"""
def __init__(self, line: int, col: int) -> None:
message = 'Invalid date'
super().__init__(line, col, message=message) | class InvalidDateError(ParseError):
'''
A date field was improperly specified.
'''
def __init__(self, line: int, col: int) -> None:
pass | 2 | 1 | 4 | 1 | 3 | 0 | 1 | 0.75 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 15 | 9 | 2 | 4 | 3 | 2 | 3 | 4 | 3 | 2 | 1 | 5 | 0 | 1 |
15,109 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/exceptions.py | pipenv.vendor.tomlkit.exceptions.InvalidDateTimeError | class InvalidDateTimeError(ParseError):
"""
A datetime field was improperly specified.
"""
def __init__(self, line: int, col: int) -> None:
message = 'Invalid datetime'
super().__init__(line, col, message=message) | class InvalidDateTimeError(ParseError):
'''
A datetime field was improperly specified.
'''
def __init__(self, line: int, col: int) -> None:
pass | 2 | 1 | 4 | 1 | 3 | 0 | 1 | 0.75 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 15 | 9 | 2 | 4 | 3 | 2 | 3 | 4 | 3 | 2 | 1 | 5 | 0 | 1 |
15,110 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/exceptions.py | pipenv.vendor.tomlkit.exceptions.InvalidNumberError | class InvalidNumberError(ParseError):
"""
A numeric field was improperly specified.
"""
def __init__(self, line: int, col: int) -> None:
message = 'Invalid number'
super().__init__(line, col, message=message) | class InvalidNumberError(ParseError):
'''
A numeric field was improperly specified.
'''
def __init__(self, line: int, col: int) -> None:
pass | 2 | 1 | 4 | 1 | 3 | 0 | 1 | 0.75 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 15 | 9 | 2 | 4 | 3 | 2 | 3 | 4 | 3 | 2 | 1 | 5 | 0 | 1 |
15,111 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/exceptions.py | pipenv.vendor.tomlkit.exceptions.InvalidNumberOrDateError | class InvalidNumberOrDateError(ParseError):
"""
A numeric or date field was improperly specified.
"""
def __init__(self, line: int, col: int) -> None:
message = 'Invalid number or date format'
super().__init__(line, col, message=message) | class InvalidNumberOrDateError(ParseError):
'''
A numeric or date field was improperly specified.
'''
def __init__(self, line: int, col: int) -> None:
pass | 2 | 1 | 4 | 1 | 3 | 0 | 1 | 0.75 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 15 | 9 | 2 | 4 | 3 | 2 | 3 | 4 | 3 | 2 | 1 | 5 | 0 | 1 |
15,112 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/exceptions.py | pipenv.vendor.tomlkit.exceptions.InvalidStringError | from typing import Collection
class InvalidStringError(ValueError, TOMLKitError):
def __init__(self, value: str, invalid_sequences: Collection[str], delimiter: str):
repr_ = repr(value)[1:-1]
super().__init__(f'Invalid string: {delimiter}{repr_}{delimiter}. The character sequences {invalid_sequenc... |
class InvalidStringError(ValueError, TOMLKitError):
def __init__(self, value: str, invalid_sequences: Collection[str], delimiter: str):
pass | 2 | 0 | 6 | 0 | 6 | 0 | 1 | 0 | 2 | 2 | 0 | 0 | 1 | 0 | 1 | 12 | 7 | 0 | 7 | 3 | 5 | 0 | 4 | 3 | 2 | 1 | 4 | 0 | 1 |
15,113 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/exceptions.py | pipenv.vendor.tomlkit.exceptions.InvalidTimeError | class InvalidTimeError(ParseError):
"""
A date field was improperly specified.
"""
def __init__(self, line: int, col: int) -> None:
message = 'Invalid time'
super().__init__(line, col, message=message) | class InvalidTimeError(ParseError):
'''
A date field was improperly specified.
'''
def __init__(self, line: int, col: int) -> None:
pass | 2 | 1 | 4 | 1 | 3 | 0 | 1 | 0.75 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 15 | 9 | 2 | 4 | 3 | 2 | 3 | 4 | 3 | 2 | 1 | 5 | 0 | 1 |
15,114 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/exceptions.py | pipenv.vendor.tomlkit.exceptions.InvalidUnicodeValueError | class InvalidUnicodeValueError(ParseError):
"""
A unicode code was improperly specified.
"""
def __init__(self, line: int, col: int) -> None:
message = 'Invalid unicode value'
super().__init__(line, col, message=message) | class InvalidUnicodeValueError(ParseError):
'''
A unicode code was improperly specified.
'''
def __init__(self, line: int, col: int) -> None:
pass | 2 | 1 | 4 | 1 | 3 | 0 | 1 | 0.75 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 15 | 9 | 2 | 4 | 3 | 2 | 3 | 4 | 3 | 2 | 1 | 5 | 0 | 1 |
15,115 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/exceptions.py | pipenv.vendor.tomlkit.exceptions.KeyAlreadyPresent | class KeyAlreadyPresent(TOMLKitError):
"""
An already present key was used.
"""
def __init__(self, key):
key = getattr(key, 'key', key)
message = f'Key "{key}" already exists.'
super().__init__(message) | class KeyAlreadyPresent(TOMLKitError):
'''
An already present key was used.
'''
def __init__(self, key):
pass | 2 | 1 | 5 | 1 | 4 | 0 | 1 | 0.6 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 11 | 10 | 2 | 5 | 3 | 3 | 3 | 5 | 3 | 3 | 1 | 4 | 0 | 1 |
15,116 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/exceptions.py | pipenv.vendor.tomlkit.exceptions.MixedArrayTypesError | class MixedArrayTypesError(ParseError):
"""
An array was found that had two or more element types.
"""
def __init__(self, line: int, col: int) -> None:
message = 'Mixed types found in array'
super().__init__(line, col, message=message) | class MixedArrayTypesError(ParseError):
'''
An array was found that had two or more element types.
'''
def __init__(self, line: int, col: int) -> None:
pass | 2 | 1 | 4 | 1 | 3 | 0 | 1 | 0.75 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 15 | 9 | 2 | 4 | 3 | 2 | 3 | 4 | 3 | 2 | 1 | 5 | 0 | 1 |
15,117 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/exceptions.py | pipenv.vendor.tomlkit.exceptions.NonExistentKey | class NonExistentKey(KeyError, TOMLKitError):
"""
A non-existent key was used.
"""
def __init__(self, key):
message = f'Key "{key}" does not exist.'
super().__init__(message) | class NonExistentKey(KeyError, TOMLKitError):
'''
A non-existent key was used.
'''
def __init__(self, key):
pass | 2 | 1 | 4 | 1 | 3 | 0 | 1 | 0.75 | 2 | 1 | 0 | 0 | 1 | 0 | 1 | 14 | 9 | 2 | 4 | 3 | 2 | 3 | 4 | 3 | 2 | 1 | 5 | 0 | 1 |
15,118 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/exceptions.py | pipenv.vendor.tomlkit.exceptions.ParseError | class ParseError(ValueError, TOMLKitError):
"""
This error occurs when the parser encounters a syntax error
in the TOML being parsed. The error references the line and
location within the line where the error was encountered.
"""
def __init__(self, line: int, col: int, message: str | None=None)... | class ParseError(ValueError, TOMLKitError):
'''
This error occurs when the parser encounters a syntax error
in the TOML being parsed. The error references the line and
location within the line where the error was encountered.
'''
def __init__(self, line: int, col: int, message: str | None=None)... | 6 | 1 | 4 | 1 | 3 | 0 | 1 | 0.38 | 2 | 3 | 0 | 14 | 3 | 2 | 3 | 14 | 23 | 5 | 13 | 8 | 7 | 5 | 11 | 6 | 7 | 2 | 4 | 1 | 4 |
15,119 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/exceptions.py | pipenv.vendor.tomlkit.exceptions.TOMLKitError | class TOMLKitError(Exception):
pass | class TOMLKitError(Exception):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 5 | 0 | 0 | 0 | 10 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
15,120 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/exceptions.py | pipenv.vendor.tomlkit.exceptions.UnexpectedCharError | class UnexpectedCharError(ParseError):
"""
An unexpected character was found during parsing.
"""
def __init__(self, line: int, col: int, char: str) -> None:
message = f'Unexpected character: {char!r}'
super().__init__(line, col, message=message) | class UnexpectedCharError(ParseError):
'''
An unexpected character was found during parsing.
'''
def __init__(self, line: int, col: int, char: str) -> None:
pass | 2 | 1 | 4 | 1 | 3 | 0 | 1 | 0.75 | 1 | 3 | 0 | 0 | 1 | 0 | 1 | 15 | 9 | 2 | 4 | 3 | 2 | 3 | 4 | 3 | 2 | 1 | 5 | 0 | 1 |
15,121 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/exceptions.py | pipenv.vendor.tomlkit.exceptions.UnexpectedEofError | class UnexpectedEofError(ParseError):
"""
The TOML being parsed ended before the end of a statement.
"""
def __init__(self, line: int, col: int) -> None:
message = 'Unexpected end of file'
super().__init__(line, col, message=message) | class UnexpectedEofError(ParseError):
'''
The TOML being parsed ended before the end of a statement.
'''
def __init__(self, line: int, col: int) -> None:
pass | 2 | 1 | 4 | 1 | 3 | 0 | 1 | 0.75 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 15 | 9 | 2 | 4 | 3 | 2 | 3 | 4 | 3 | 2 | 1 | 5 | 0 | 1 |
15,122 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/items.py | pipenv.vendor.tomlkit.items.AbstractTable | from pipenv.vendor.tomlkit._types import _CustomDict
from typing import Any
from typing import cast
import copy
from typing import Iterator
from typing import overload
import re
class AbstractTable(Item, _CustomDict):
"""Common behaviour of both :class:`Table` and :class:`InlineTable`"""
def __init__(self, va... |
class AbstractTable(Item, _CustomDict):
'''Common behaviour of both :class:`Table` and :class:`InlineTable`'''
def __init__(self, value: container.Container, trivia: Trivia):
pass
def unwrap(self) -> dict[str, Any]:
pass
@property
def value(self) -> container.Container:
pa... | 25 | 1 | 5 | 1 | 4 | 0 | 2 | 0.01 | 2 | 11 | 5 | 2 | 19 | 1 | 19 | 61 | 112 | 32 | 79 | 33 | 58 | 1 | 77 | 28 | 57 | 7 | 2 | 2 | 34 |
15,123 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/items.py | pipenv.vendor.tomlkit.items.AoT | import re
from pipenv.vendor.tomlkit._types import _CustomList
from typing import overload
from typing import Any
class AoT(Item, _CustomList):
"""
An array of table literal
"""
def __init__(self, body: list[Table], name: str | None=None, parsed: bool=False) -> None:
self.name = name
s... |
class AoT(Item, _CustomList):
'''
An array of table literal
'''
def __init__(self, body: list[Table], name: str | None=None, parsed: bool=False) -> None:
pass
def unwrap(self) -> list[dict[str, Any]]:
pass
@property
def body(self) -> list[Table]:
pass
@property... | 22 | 2 | 5 | 0 | 5 | 0 | 2 | 0.05 | 2 | 12 | 2 | 0 | 16 | 3 | 16 | 64 | 105 | 20 | 81 | 38 | 59 | 4 | 73 | 31 | 56 | 12 | 2 | 2 | 33 |
15,124 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/items.py | pipenv.vendor.tomlkit.items.Array | from typing import cast
from pipenv.vendor.tomlkit._types import _CustomList
from typing import Iterator
from typing import Any
class Array(Item, _CustomList):
"""
An array literal
"""
def __init__(self, value: list[Item], trivia: Trivia, multiline: bool=False) -> None:
super().__init__(trivia... |
class Array(Item, _CustomList):
'''
An array literal
'''
def __init__(self, value: list[Item], trivia: Trivia, multiline: bool=False) -> None:
pass
def _group_values(self, value: list[Item]) -> list[_ArrayItemGroup]:
'''Group the values into (indent, value, comma, comment) tuples'... | 20 | 5 | 16 | 1 | 13 | 2 | 4 | 0.18 | 2 | 18 | 5 | 0 | 17 | 3 | 17 | 65 | 298 | 27 | 231 | 66 | 202 | 42 | 178 | 53 | 160 | 16 | 2 | 4 | 72 |
15,125 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/items.py | pipenv.vendor.tomlkit.items.Bool | class Bool(Item):
"""
A boolean literal.
"""
def __init__(self, t: int, trivia: Trivia) -> None:
super().__init__(trivia)
self._value = bool(t)
def unwrap(self) -> bool:
return bool(self)
@property
def discriminant(self) -> int:
return 4
@property
... | class Bool(Item):
'''
A boolean literal.
'''
def __init__(self, t: int, trivia: Trivia) -> None:
pass
def unwrap(self) -> bool:
pass
@property
def discriminant(self) -> int:
pass
@property
def value(self) -> bool:
'''The wrapped boolean value'''
... | 13 | 2 | 3 | 0 | 2 | 0 | 1 | 0.15 | 1 | 5 | 1 | 0 | 10 | 1 | 10 | 25 | 44 | 13 | 27 | 15 | 14 | 4 | 25 | 13 | 14 | 2 | 1 | 1 | 11 |
15,126 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/items.py | pipenv.vendor.tomlkit.items.BoolType | from enum import Enum
class BoolType(Enum):
TRUE = 'true'
FALSE = 'false'
def __bool__(self):
return {BoolType.TRUE: True, BoolType.FALSE: False}[self]
def __iter__(self):
return iter(self.value)
def __len__(self):
return len(self.value) |
class BoolType(Enum):
def __bool__(self):
pass
def __iter__(self):
pass
def __len__(self):
pass | 4 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 3 | 0 | 3 | 52 | 12 | 3 | 9 | 6 | 5 | 0 | 9 | 6 | 5 | 1 | 4 | 0 | 3 |
15,127 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/items.py | pipenv.vendor.tomlkit.items.Comment | from pipenv.vendor.tomlkit._compat import decode
class Comment(Item):
"""
A comment literal.
"""
@property
def discriminant(self) -> int:
return 1
def as_string(self) -> str:
return f'{self._trivia.indent}{decode(self._trivia.comment)}{self._trivia.trail}'
def __str__(sel... |
class Comment(Item):
'''
A comment literal.
'''
@property
def discriminant(self) -> int:
pass
def as_string(self) -> str:
pass
def __str__(self) -> str:
pass | 5 | 1 | 3 | 0 | 3 | 0 | 1 | 0.3 | 1 | 2 | 0 | 0 | 3 | 0 | 3 | 18 | 16 | 3 | 10 | 5 | 5 | 3 | 7 | 4 | 3 | 1 | 1 | 0 | 3 |
15,128 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/items.py | pipenv.vendor.tomlkit.items.Date | from typing import Any
from pipenv.vendor.tomlkit._compat import PY38
from datetime import date
class Date(Item, date):
"""
A date literal.
"""
def __new__(cls, year: int, month: int, day: int, *_: Any) -> date:
return date.__new__(cls, year, month, day)
def __init__(self, year: int, mont... |
class Date(Item, date):
'''
A date literal.
'''
def __new__(cls, year: int, month: int, day: int, *_: Any) -> date:
pass
def __init__(self, year: int, month: int, day: int, trivia: Trivia | None=None, raw: str='') -> None:
pass
def unwrap(self) -> date:
pass
@prop... | 14 | 1 | 4 | 0 | 4 | 0 | 1 | 0.07 | 2 | 5 | 1 | 0 | 11 | 1 | 11 | 58 | 64 | 16 | 45 | 26 | 24 | 3 | 34 | 17 | 22 | 3 | 1 | 1 | 14 |
15,129 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/items.py | pipenv.vendor.tomlkit.items.DateTime | from typing import Any
from datetime import tzinfo
from pipenv.vendor.tomlkit._compat import PY38
from datetime import datetime
class DateTime(Item, datetime):
"""
A datetime literal.
"""
def __new__(cls, year: int, month: int, day: int, hour: int, minute: int, second: int, microsecond: int, tzinfo: t... |
class DateTime(Item, datetime):
'''
A datetime literal.
'''
def __new__(cls, year: int, month: int, day: int, hour: int, minute: int, second: int, microsecond: int, tzinfo: tzinfo | None, *_: Any, **kwargs: Any) -> datetime:
pass
def __init__(self, year: int, month: int, day: int, hour: i... | 15 | 1 | 11 | 0 | 11 | 0 | 1 | 0.02 | 2 | 6 | 1 | 0 | 12 | 1 | 12 | 104 | 150 | 17 | 130 | 54 | 90 | 3 | 39 | 19 | 26 | 3 | 2 | 1 | 16 |
15,130 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/items.py | pipenv.vendor.tomlkit.items.DottedKey | from typing import Iterable
class DottedKey(Key):
def __init__(self, keys: Iterable[SingleKey], sep: str | None=None, original: str | None=None) -> None:
self._keys = list(keys)
if original is None:
original = '.'.join((k.as_string() for k in self._keys))
self.sep = ' = ' if se... |
class DottedKey(Key):
def __init__(self, keys: Iterable[SingleKey], sep: str | None=None, original: str | None=None) -> None:
pass
def __hash__(self) -> int:
pass
def __eq__(self, __o: object) -> bool:
pass | 4 | 0 | 6 | 0 | 6 | 0 | 2 | 0 | 1 | 6 | 1 | 0 | 3 | 5 | 3 | 32 | 21 | 3 | 18 | 14 | 9 | 0 | 13 | 9 | 9 | 3 | 5 | 1 | 5 |
15,131 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/items.py | pipenv.vendor.tomlkit.items.Float | from pipenv.vendor.tomlkit._types import _CustomFloat
import math
import sys
import re
from pipenv.vendor.tomlkit._types import wrap_method
class Float(Item, _CustomFloat):
"""
A float literal.
"""
def __new__(cls, value: float, trivia: Trivia, raw: str) -> Float:
return float.__new__(cls, val... |
class Float(Item, _CustomFloat):
'''
A float literal.
'''
def __new__(cls, value: float, trivia: Trivia, raw: str) -> Float:
pass
def __init__(self, value: float, trivia: Trivia, raw: str) -> None:
pass
def unwrap(self) -> float:
pass
def __hash__(self) -> int:
... | 12 | 2 | 3 | 0 | 3 | 0 | 1 | 0.09 | 2 | 4 | 1 | 0 | 9 | 3 | 9 | 67 | 76 | 15 | 56 | 39 | 44 | 5 | 53 | 37 | 43 | 2 | 2 | 1 | 11 |
15,132 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/items.py | pipenv.vendor.tomlkit.items.InlineTable | from typing import Any
class InlineTable(AbstractTable):
"""
An inline table literal.
"""
def __init__(self, value: container.Container, trivia: Trivia, new: bool=False) -> None:
super().__init__(value, trivia)
self._new = new
@property
def discriminant(self) -> int:
r... |
class InlineTable(AbstractTable):
'''
An inline table literal.
'''
def __init__(self, value: container.Container, trivia: Trivia, new: bool=False) -> None:
pass
@property
def discriminant(self) -> int:
pass
def append(self, key: Key | str | None, _item: Any) -> InlineTable... | 9 | 2 | 11 | 2 | 9 | 0 | 3 | 0.09 | 1 | 14 | 5 | 0 | 7 | 1 | 7 | 68 | 90 | 19 | 65 | 16 | 54 | 6 | 47 | 13 | 39 | 8 | 3 | 4 | 21 |
15,133 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/items.py | pipenv.vendor.tomlkit.items.Integer | from pipenv.vendor.tomlkit._types import wrap_method
from pipenv.vendor.tomlkit._types import _CustomInt
import re
class Integer(Item, _CustomInt):
"""
An integer literal.
"""
def __new__(cls, value: int, trivia: Trivia, raw: str) -> Integer:
return int.__new__(cls, value)
def __init__(se... |
class Integer(Item, _CustomInt):
'''
An integer literal.
'''
def __new__(cls, value: int, trivia: Trivia, raw: str) -> Integer:
pass
def __init__(self, value: int, trivia: Trivia, raw: str) -> None:
pass
def unwrap(self) -> int:
pass
def __hash__(self) -> int:
... | 14 | 2 | 4 | 0 | 3 | 0 | 1 | 0.07 | 2 | 4 | 2 | 0 | 11 | 3 | 11 | 81 | 91 | 15 | 71 | 52 | 57 | 5 | 69 | 50 | 57 | 2 | 2 | 1 | 15 |
15,134 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/items.py | pipenv.vendor.tomlkit.items.Item | from typing import Any
class Item:
"""
An item within a TOML document.
"""
def __init__(self, trivia: Trivia) -> None:
self._trivia = trivia
@property
def trivia(self) -> Trivia:
"""The trivia element associated with this item"""
return self._trivia
@property
... |
class Item:
'''
An item within a TOML document.
'''
def __init__(self, trivia: Trivia) -> None:
pass
@property
def trivia(self) -> Trivia:
'''The trivia element associated with this item'''
pass
@property
def discriminant(self) -> int:
pass
def as_s... | 19 | 6 | 3 | 0 | 3 | 0 | 1 | 0.26 | 0 | 10 | 5 | 13 | 15 | 1 | 15 | 15 | 70 | 19 | 42 | 20 | 23 | 11 | 38 | 17 | 22 | 2 | 0 | 1 | 17 |
15,135 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/items.py | pipenv.vendor.tomlkit.items.Key | from typing import Iterator
import abc
class Key(abc.ABC):
"""Base class for a key"""
sep: str
_original: str
_keys: list[SingleKey]
_dotted: bool
key: str
@abc.abstractmethod
def __hash__(self) -> int:
pass
@abc.abstractmethod
def __eq__(self, __o: object) -> bool:
... |
class Key(abc.ABC):
'''Base class for a key'''
@abc.abstractmethod
def __hash__(self) -> int:
pass
@abc.abstractmethod
def __eq__(self, __o: object) -> bool:
pass
def is_dotted(self) -> bool:
'''If the key is followed by other keys'''
pass
def __iter__(self... | 12 | 5 | 3 | 0 | 2 | 0 | 1 | 0.19 | 1 | 5 | 2 | 2 | 9 | 0 | 9 | 29 | 42 | 10 | 27 | 13 | 15 | 5 | 25 | 11 | 15 | 1 | 4 | 0 | 9 |
15,136 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/items.py | pipenv.vendor.tomlkit.items.KeyType | from enum import Enum
class KeyType(Enum):
"""
The type of a Key.
Keys can be bare (unquoted), or quoted using basic ("), or literal (')
quotes following the same escaping rules as single-line StringType.
"""
Bare = ''
Basic = '"'
Literal = "'" |
class KeyType(Enum):
'''
The type of a Key.
Keys can be bare (unquoted), or quoted using basic ("), or literal (')
quotes following the same escaping rules as single-line StringType.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1.25 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 11 | 2 | 4 | 4 | 3 | 5 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
15,137 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/items.py | pipenv.vendor.tomlkit.items.Null | class Null(Item):
"""
A null item.
"""
def __init__(self) -> None:
super().__init__(Trivia(trail=''))
def unwrap(self) -> None:
return None
@property
def discriminant(self) -> int:
return -1
@property
def value(self) -> None:
return None
def a... | class Null(Item):
'''
A null item.
'''
def __init__(self) -> None:
pass
def unwrap(self) -> None:
pass
@property
def discriminant(self) -> int:
pass
@property
def value(self) -> None:
pass
def as_string(self) -> str:
pass
def _getst... | 9 | 1 | 2 | 0 | 2 | 0 | 1 | 0.2 | 1 | 5 | 1 | 0 | 6 | 0 | 6 | 21 | 24 | 6 | 15 | 9 | 6 | 3 | 13 | 7 | 6 | 1 | 1 | 0 | 6 |
15,138 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/items.py | pipenv.vendor.tomlkit.items.SingleKey | from typing import Any
import string
from pipenv.vendor.tomlkit._utils import escape_string
class SingleKey(Key):
"""A single key"""
def __init__(self, k: str, t: KeyType | None=None, sep: str | None=None, original: str | None=None) -> None:
if t is None:
if not k or any((c not in string.a... |
class SingleKey(Key):
'''A single key'''
def __init__(self, k: str, t: KeyType | None=None, sep: str | None=None, original: str | None=None) -> None:
pass
@property
def delimiter(self) -> str:
'''The delimiter: double quote/single quote/none'''
pass
def is_bare(self) -> bo... | 7 | 3 | 8 | 1 | 7 | 0 | 2 | 0.08 | 1 | 5 | 1 | 0 | 5 | 6 | 5 | 34 | 49 | 9 | 37 | 20 | 24 | 3 | 27 | 13 | 21 | 6 | 5 | 2 | 11 |
15,139 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/items.py | pipenv.vendor.tomlkit.items.String | from pipenv.vendor.tomlkit._utils import escape_string
from pipenv.vendor.tomlkit.exceptions import InvalidStringError
from pipenv.vendor.tomlkit._compat import decode
class String(str, Item):
"""
A string literal.
"""
def __new__(cls, t, value, original, trivia):
return super().__new__(cls, v... |
class String(str, Item):
'''
A string literal.
'''
def __new__(cls, t, value, original, trivia):
pass
def __init__(self, t: StringType, _: str, original: str, trivia: Trivia) -> None:
pass
def unwrap(self) -> str:
pass
@property
def discriminant(self) -> int:
... | 14 | 1 | 4 | 1 | 3 | 0 | 1 | 0.08 | 2 | 5 | 3 | 0 | 9 | 2 | 10 | 91 | 54 | 15 | 36 | 21 | 22 | 3 | 33 | 18 | 22 | 3 | 2 | 1 | 13 |
15,140 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/items.py | pipenv.vendor.tomlkit.items.StringType | from pipenv.vendor.tomlkit._utils import CONTROL_CHARS
from enum import Enum
from typing import Collection
class StringType(Enum):
SLB = '"'
MLB = '"""'
SLL = "'"
MLL = "'''"
@classmethod
def select(cls, literal=False, multiline=False) -> StringType:
return {(False, False): cls.SLB, (F... |
class StringType(Enum):
@classmethod
def select(cls, literal=False, multiline=False) -> StringType:
pass
@property
def escaped_sequences(self) -> Collection[str]:
pass
@property
def invalid_sequences(self) -> Collection[str]:
pass
@property
def unit(self) -> str... | 14 | 0 | 5 | 0 | 5 | 0 | 1 | 0.12 | 1 | 2 | 0 | 0 | 8 | 0 | 9 | 58 | 66 | 9 | 51 | 22 | 37 | 6 | 27 | 18 | 17 | 1 | 4 | 0 | 9 |
15,141 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/items.py | pipenv.vendor.tomlkit.items.Table | import re
from typing import Any
class Table(AbstractTable):
"""
A table literal.
"""
def __init__(self, value: container.Container, trivia: Trivia, is_aot_element: bool, is_super_table: bool | None=None, name: str | None=None, display_name: str | None=None) -> None:
super().__init__(value, tr... |
class Table(AbstractTable):
'''
A table literal.
'''
def __init__(self, value: container.Container, trivia: Trivia, is_aot_element: bool, is_super_table: bool | None=None, name: str | None=None, display_name: str | None=None) -> None:
pass
@property
def discriminant(self) -> int:
... | 13 | 7 | 12 | 1 | 9 | 1 | 3 | 0.13 | 1 | 13 | 6 | 0 | 11 | 4 | 11 | 72 | 147 | 28 | 105 | 34 | 84 | 14 | 76 | 25 | 64 | 7 | 3 | 2 | 31 |
15,142 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/items.py | pipenv.vendor.tomlkit.items.Time | from datetime import tzinfo
from typing import Any
from datetime import time
class Time(Item, time):
"""
A time literal.
"""
def __new__(cls, hour: int, minute: int, second: int, microsecond: int, tzinfo: tzinfo | None, *_: Any) -> time:
return time.__new__(cls, hour, minute, second, microseco... |
class Time(Item, time):
'''
A time literal.
'''
def __new__(cls, hour: int, minute: int, second: int, microsecond: int, tzinfo: tzinfo | None, *_: Any) -> time:
pass
def __init__(self, hour: int, minute: int, second: int, microsecond: int, tzinfo: tzinfo | None, trivia: Trivia | None=None... | 12 | 1 | 6 | 0 | 6 | 0 | 1 | 0.05 | 2 | 6 | 1 | 0 | 9 | 1 | 9 | 52 | 71 | 11 | 57 | 32 | 28 | 3 | 22 | 13 | 12 | 1 | 1 | 0 | 9 |
15,143 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/items.py | pipenv.vendor.tomlkit.items.Trivia | import dataclasses
@dataclasses.dataclass
class Trivia:
"""
Trivia information (aka metadata).
"""
indent: str = ''
comment_ws: str = ''
comment: str = ''
trail: str = '\n'
def copy(self) -> Trivia:
return dataclasses.replace(self) | @dataclasses.dataclass
class Trivia:
'''
Trivia information (aka metadata).
'''
def copy(self) -> Trivia:
pass | 3 | 1 | 2 | 0 | 2 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 16 | 2 | 7 | 6 | 5 | 7 | 7 | 6 | 5 | 1 | 0 | 0 | 1 |
15,144 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/items.py | pipenv.vendor.tomlkit.items.Whitespace | class Whitespace(Item):
"""
A whitespace literal.
"""
def __init__(self, s: str, fixed: bool=False) -> None:
self._s = s
self._fixed = fixed
@property
def s(self) -> str:
return self._s
@property
def value(self) -> str:
"""The wrapped string of the whit... | class Whitespace(Item):
'''
A whitespace literal.
'''
def __init__(self, s: str, fixed: bool=False) -> None:
pass
@property
def s(self) -> str:
pass
@property
def value(self) -> str:
'''The wrapped string of the whitespace'''
pass
@property
def tr... | 14 | 3 | 2 | 0 | 2 | 0 | 1 | 0.21 | 1 | 5 | 1 | 0 | 9 | 2 | 9 | 24 | 38 | 9 | 24 | 16 | 10 | 5 | 20 | 12 | 10 | 1 | 1 | 0 | 9 |
15,145 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/items.py | pipenv.vendor.tomlkit.items._ArrayItemGroup | from typing import Iterator
class _ArrayItemGroup:
__slots__ = ('value', 'indent', 'comma', 'comment')
def __init__(self, value: Item | None=None, indent: Whitespace | None=None, comma: Whitespace | None=None, comment: Comment | None=None) -> None:
self.value = value
self.indent = indent
... |
class _ArrayItemGroup:
def __init__(self, value: Item | None=None, indent: Whitespace | None=None, comma: Whitespace | None=None, comment: Comment | None=None) -> None:
pass
def __iter__(self) -> Iterator[Item]:
pass
def __repr__(self) -> str:
pass
def is_whitespace(self) ->... | 6 | 0 | 5 | 0 | 5 | 0 | 1 | 0 | 0 | 8 | 3 | 0 | 5 | 4 | 5 | 5 | 32 | 5 | 27 | 17 | 15 | 0 | 19 | 11 | 13 | 2 | 0 | 1 | 6 |
15,146 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/parser.py | pipenv.vendor.tomlkit.parser.Parser | from pipenv.vendor.tomlkit.source import Source
from pipenv.vendor.tomlkit.exceptions import UnexpectedEofError
from pipenv.vendor.tomlkit._utils import _escaped
from pipenv.vendor.tomlkit.items import InlineTable
from pipenv.vendor.tomlkit.items import Key
import datetime
from pipenv.vendor.tomlkit.items import DateTi... |
class Parser:
'''
Parser for TOML documents.
'''
def __init__(self, string: str | bytes) -> None:
pass
@property
def _state(self):
pass
@property
def _idx(self):
pass
@property
def _current(self):
pass
@property
def _marker(self):
... | 42 | 21 | 28 | 4 | 19 | 5 | 5 | 0.27 | 0 | 56 | 38 | 0 | 37 | 2 | 37 | 37 | 1,084 | 189 | 718 | 137 | 674 | 191 | 566 | 129 | 528 | 28 | 0 | 6 | 198 |
15,147 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/source.py | pipenv.vendor.tomlkit.source.Source | from pipenv.vendor.tomlkit.toml_char import TOMLChar
from pipenv.vendor.tomlkit.exceptions import UnexpectedCharError
from pipenv.vendor.tomlkit.exceptions import ParseError
from typing import Any
class Source(str):
EOF = TOMLChar('\x00')
def __init__(self, _: str) -> None:
super().__init__()
... |
class Source(str):
def __init__(self, _: str) -> None:
pass
def reset(self):
pass
@property
def state(self) -> _StateHandler:
pass
@property
def idx(self) -> int:
pass
@property
def current(self) -> TOMLChar:
pass
@property
def marker(se... | 19 | 7 | 7 | 1 | 4 | 2 | 2 | 0.41 | 1 | 13 | 4 | 0 | 14 | 5 | 14 | 80 | 118 | 25 | 66 | 34 | 42 | 27 | 57 | 24 | 42 | 4 | 2 | 2 | 21 |
15,148 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/source.py | pipenv.vendor.tomlkit.source._State | from copy import copy
class _State:
def __init__(self, source: Source, save_marker: bool | None=False, restore: bool | None=False) -> None:
self._source = source
self._save_marker = save_marker
self.restore = restore
def __enter__(self) -> _State:
self._chars = copy(self._sour... |
class _State:
def __init__(self, source: Source, save_marker: bool | None=False, restore: bool | None=False) -> None:
pass
def __enter__(self) -> _State:
pass
def __exit__(self, exception_type, exception_val, trace):
pass | 4 | 0 | 8 | 0 | 7 | 1 | 2 | 0.09 | 0 | 2 | 1 | 0 | 3 | 7 | 3 | 3 | 28 | 3 | 23 | 16 | 14 | 2 | 18 | 11 | 14 | 3 | 0 | 2 | 5 |
15,149 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/source.py | pipenv.vendor.tomlkit.source._StateHandler | class _StateHandler:
"""
State preserver for the Parser.
"""
def __init__(self, source: Source) -> None:
self._source = source
self._states = []
def __call__(self, *args, **kwargs):
return _State(self._source, *args, **kwargs)
def __enter__(self) -> _State:
sta... | class _StateHandler:
'''
State preserver for the Parser.
'''
def __init__(self, source: Source) -> None:
pass
def __call__(self, *args, **kwargs):
pass
def __enter__(self) -> _State:
pass
def __exit__(self, exception_type, exception_val, trace):
pass | 5 | 1 | 3 | 0 | 3 | 0 | 1 | 0.23 | 0 | 2 | 2 | 0 | 4 | 2 | 4 | 4 | 20 | 4 | 13 | 9 | 8 | 3 | 13 | 9 | 8 | 1 | 0 | 0 | 4 |
15,150 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/toml_char.py | pipenv.vendor.tomlkit.toml_char.TOMLChar | import string
class TOMLChar(str):
def __init__(self, c):
super().__init__()
if len(self) > 1:
raise ValueError('A TOML character must be of length 1')
BARE = string.ascii_letters + string.digits + '-_'
KV = '= \t'
NUMBER = string.digits + '+-_.e'
SPACES = ' \t'
NL ... |
class TOMLChar(str):
def __init__(self, c):
pass
def is_bare_key_char(self) -> bool:
'''
Whether the character is a valid bare key name or not.
'''
pass
def is_kv_sep(self) -> bool:
'''
Whether the character is a valid key/value separator or not.
... | 8 | 6 | 5 | 0 | 2 | 3 | 1 | 0.78 | 1 | 3 | 0 | 0 | 7 | 0 | 7 | 73 | 49 | 8 | 23 | 14 | 15 | 18 | 23 | 14 | 15 | 2 | 2 | 1 | 8 |
15,151 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/toml_document.py | pipenv.vendor.tomlkit.toml_document.TOMLDocument | from pipenv.vendor.tomlkit.container import Container
class TOMLDocument(Container):
"""
A TOML document.
""" |
class TOMLDocument(Container):
'''
A TOML document.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 3 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 4 | 0 | 1 | 1 | 0 | 3 | 1 | 1 | 0 | 0 | 3 | 0 | 0 |
15,152 | pypa/pipenv | pypa_pipenv/pipenv/vendor/tomlkit/toml_file.py | pipenv.vendor.tomlkit.toml_file.TOMLFile | from pipenv.vendor.tomlkit.toml_document import TOMLDocument
import os
import re
from pipenv.vendor.tomlkit.api import loads
class TOMLFile:
"""
Represents a TOML file.
:param path: path to the TOML file
"""
def __init__(self, path: _StrPath) -> None:
self._path = path
self._lines... |
class TOMLFile:
'''
Represents a TOML file.
:param path: path to the TOML file
'''
def __init__(self, path: _StrPath) -> None:
pass
def read(self) -> TOMLDocument:
'''Read the file content as a :class:`tomlkit.toml_document.TOMLDocument`.'''
pass
def write(self, d... | 4 | 3 | 11 | 1 | 8 | 1 | 3 | 0.32 | 0 | 1 | 1 | 0 | 3 | 2 | 3 | 3 | 41 | 8 | 25 | 12 | 21 | 8 | 22 | 10 | 18 | 4 | 0 | 3 | 8 |
15,153 | pypa/pipenv | pypa_pipenv/pipenv/vendor/zipp/__init__.py | pipenv.vendor.zipp.CompleteDirs | import posixpath
import itertools
import zipfile
class CompleteDirs(InitializedState, zipfile.ZipFile):
"""
A ZipFile subclass that ensures that implied directories
are always included in the namelist.
>>> list(CompleteDirs._implied_dirs(['foo/bar.txt', 'foo/bar/baz.txt']))
['foo/', 'foo/bar/']
... |
class CompleteDirs(InitializedState, zipfile.ZipFile):
'''
A ZipFile subclass that ensures that implied directories
are always included in the namelist.
>>> list(CompleteDirs._implied_dirs(['foo/bar.txt', 'foo/bar/baz.txt']))
['foo/', 'foo/bar/']
>>> list(CompleteDirs._implied_dirs(['foo/bar.tx... | 11 | 5 | 8 | 0 | 5 | 2 | 2 | 0.63 | 2 | 7 | 0 | 1 | 4 | 0 | 7 | 38 | 73 | 11 | 38 | 18 | 27 | 24 | 35 | 15 | 27 | 4 | 1 | 2 | 14 |
15,154 | pypa/pipenv | pypa_pipenv/pipenv/vendor/zipp/__init__.py | pipenv.vendor.zipp.Path | import re
import posixpath
from .glob import Translator
import stat
import pathlib
import io
class Path:
"""
A :class:`importlib.resources.abc.Traversable` interface for zip files.
Implements many of the features users enjoy from
:class:`pathlib.Path`.
Consider a zip file with this structure::
... |
class Path:
'''
A :class:`importlib.resources.abc.Traversable` interface for zip files.
Implements many of the features users enjoy from
:class:`pathlib.Path`.
Consider a zip file with this structure::
.
├── a.txt
└── b
├── c.txt
└── d
... | 34 | 5 | 4 | 0 | 3 | 1 | 1 | 1 | 0 | 10 | 2 | 0 | 27 | 2 | 27 | 27 | 249 | 57 | 96 | 51 | 62 | 96 | 90 | 43 | 62 | 5 | 0 | 2 | 36 |
15,155 | pypa/pipenv | pypa_pipenv/pipenv/vendor/zipp/compat/overlay.py | pipenv.vendor.zipp.compat.overlay.HashableNamespace | import types
class HashableNamespace(types.SimpleNamespace):
def __hash__(self):
return hash(tuple(vars(self))) |
class HashableNamespace(types.SimpleNamespace):
def __hash__(self):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 1 | 0 | 1 |
15,156 | pypa/pipenv | pypa_pipenv/pipenv/vendor/zipp/glob.py | pipenv.vendor.zipp.glob.Translator | import re
class Translator:
"""
>>> Translator('xyz')
Traceback (most recent call last):
...
AssertionError: Invalid separators
>>> Translator('')
Traceback (most recent call last):
...
AssertionError: Invalid separators
"""
seps: str
def __init__(self, seps: str=_defa... |
class Translator:
'''
>>> Translator('xyz')
Traceback (most recent call last):
...
AssertionError: Invalid separators
>>> Translator('')
Traceback (most recent call last):
...
AssertionError: Invalid separators
'''
def __init__(self, seps: str=_default_seps):
pass
... | 10 | 8 | 8 | 1 | 4 | 4 | 1 | 1.44 | 0 | 4 | 0 | 0 | 8 | 0 | 8 | 8 | 95 | 17 | 32 | 14 | 22 | 46 | 27 | 14 | 17 | 2 | 0 | 1 | 11 |
15,157 | google/flatbuffers | google_flatbuffers/conanfile.py | conanfile.FlatbuffersConan | from conans import ConanFile, CMake, tools
import os
import shutil
class FlatbuffersConan(ConanFile):
name = 'flatbuffers'
license = 'Apache-2.0'
url = 'https://github.com/google/flatbuffers'
homepage = 'http://google.github.io/flatbuffers/'
author = 'Wouter van Oortmerssen'
topics = ('conan', ... |
class FlatbuffersConan(ConanFile):
def source(self):
'''Wrap the original CMake file to call conan_basic_setup
'''
pass
def config_options(self):
'''Remove fPIC option on Windows platform
'''
pass
def configure_cmake(self):
'''Create CMake instance... | 7 | 6 | 8 | 0 | 6 | 2 | 2 | 0.26 | 1 | 0 | 0 | 0 | 6 | 0 | 6 | 6 | 65 | 6 | 47 | 23 | 40 | 12 | 44 | 23 | 37 | 4 | 1 | 2 | 10 |
15,158 | google/flatbuffers | google_flatbuffers/grpc/examples/python/greeter/models/HelloReply.py | models.HelloReply.HelloReply | import flatbuffers
class HelloReply(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = HelloReply()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsHelloRe... |
class HelloReply(object):
@classmethod
def GetRootAs(cls, buf, offset=0):
pass
@classmethod
def GetRootAsHelloReply(cls, buf, offset=0):
'''This method is deprecated. Please switch to GetRootAs.'''
pass
def Init(self, buf, pos):
pass
def Message(self):
... | 7 | 1 | 4 | 0 | 4 | 0 | 1 | 0.17 | 1 | 0 | 0 | 0 | 2 | 1 | 4 | 4 | 24 | 3 | 18 | 12 | 11 | 3 | 16 | 10 | 11 | 2 | 1 | 1 | 5 |
15,159 | google/flatbuffers | google_flatbuffers/grpc/examples/python/greeter/models/HelloRequest.py | models.HelloRequest.HelloRequest | import flatbuffers
class HelloRequest(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = HelloRequest()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsHel... |
class HelloRequest(object):
@classmethod
def GetRootAs(cls, buf, offset=0):
pass
@classmethod
def GetRootAsHelloRequest(cls, buf, offset=0):
'''This method is deprecated. Please switch to GetRootAs.'''
pass
def Init(self, buf, pos):
pass
def Name(self):
... | 7 | 1 | 4 | 0 | 4 | 0 | 1 | 0.17 | 1 | 0 | 0 | 0 | 2 | 1 | 4 | 4 | 24 | 3 | 18 | 12 | 11 | 3 | 16 | 10 | 11 | 2 | 1 | 1 | 5 |
15,160 | google/flatbuffers | google_flatbuffers/grpc/examples/python/greeter/models/greeter_grpc_fb.py | models.greeter_grpc_fb.GreeterServicer | import grpc
class GreeterServicer(object):
"""Interface exported by the server."""
def SayHello(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SayManyH... |
class GreeterServicer(object):
'''Interface exported by the server.'''
def SayHello(self, request, context):
pass
def SayManyHellos(self, request, context):
pass | 3 | 1 | 4 | 0 | 4 | 0 | 1 | 0.11 | 1 | 1 | 0 | 1 | 2 | 0 | 2 | 2 | 13 | 3 | 9 | 3 | 6 | 1 | 9 | 3 | 6 | 1 | 1 | 0 | 2 |
15,161 | google/flatbuffers | google_flatbuffers/grpc/examples/python/greeter/models/greeter_grpc_fb.py | models.greeter_grpc_fb.GreeterStub | class GreeterStub(object):
"""Interface exported by the server."""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.SayHello = channel.unary_unary(method='/models.Greeter/SayHello')
self.SayManyHellos = channel.unary_stream(... | class GreeterStub(object):
'''Interface exported by the server.'''
def __init__(self, channel):
'''Constructor.
Args:
channel: A grpc.Channel.
'''
pass | 2 | 2 | 14 | 3 | 7 | 4 | 1 | 0.63 | 1 | 0 | 0 | 0 | 1 | 2 | 1 | 1 | 17 | 4 | 8 | 4 | 6 | 5 | 4 | 4 | 2 | 1 | 1 | 0 | 1 |
15,162 | google/flatbuffers | google_flatbuffers/goldens/py/flatbuffers/goldens/Galaxy.py | py.flatbuffers.goldens.Galaxy.Galaxy | import flatbuffers
class Galaxy(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = Galaxy()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsGalaxy(cls, buf... |
class Galaxy(object):
@classmethod
def GetRootAs(cls, buf, offset=0):
pass
@classmethod
def GetRootAsGalaxy(cls, buf, offset=0):
'''This method is deprecated. Please switch to GetRootAs.'''
pass
def Init(self, buf, pos):
pass
def NumStars(self):
pass | 7 | 1 | 4 | 0 | 4 | 0 | 1 | 0.17 | 1 | 0 | 0 | 0 | 2 | 1 | 4 | 4 | 24 | 3 | 18 | 12 | 11 | 3 | 16 | 10 | 11 | 2 | 1 | 1 | 5 |
15,163 | google/flatbuffers | google_flatbuffers/goldens/py/flatbuffers/goldens/Universe.py | py.flatbuffers.goldens.Universe.Universe | import flatbuffers
class Universe(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, offset=0):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = Universe()
x.Init(buf, n + offset)
return x
@classmethod
def GetRootAsUniverse(cl... |
class Universe(object):
@classmethod
def GetRootAs(cls, buf, offset=0):
pass
@classmethod
def GetRootAsUniverse(cls, buf, offset=0):
'''This method is deprecated. Please switch to GetRootAs.'''
pass
def Init(self, buf, pos):
pass
def Age(self):
pass
... | 10 | 1 | 5 | 0 | 5 | 0 | 1 | 0.16 | 1 | 1 | 1 | 0 | 5 | 1 | 7 | 7 | 49 | 6 | 37 | 21 | 26 | 6 | 35 | 19 | 26 | 2 | 1 | 1 | 10 |
15,164 | google/flatbuffers | google_flatbuffers/python/flatbuffers/builder.py | python.flatbuffers.builder.Builder | from . import packer
from .compat import range_func
from .number_types import UOffsetTFlags, SOffsetTFlags, VOffsetTFlags
import warnings
from . import compat
from .compat import import_numpy, NumpyRequiredForThisFeature
from . import number_types as N
from . import encode
class Builder(object):
""" A Builder is u... |
class Builder(object):
''' A Builder is used to construct one or more FlatBuffers.
Typically, Builder objects will be used from code generated by the `flatc`
compiler.
A Builder constructs byte buffers in a last-first manner for simplicity and
performance during reading.
Internally, a Builder i... | 61 | 45 | 10 | 1 | 5 | 3 | 2 | 0.75 | 1 | 28 | 22 | 0 | 60 | 11 | 60 | 60 | 709 | 155 | 318 | 108 | 270 | 237 | 317 | 107 | 256 | 8 | 1 | 4 | 100 |
15,165 | google/flatbuffers | google_flatbuffers/python/flatbuffers/builder.py | python.flatbuffers.builder.BuilderNotFinishedError | class BuilderNotFinishedError(RuntimeError):
"""
Error caused by not calling `Finish` before calling `Output`.
"""
pass | class BuilderNotFinishedError(RuntimeError):
'''
Error caused by not calling `Finish` before calling `Output`.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 5 | 0 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
15,166 | google/flatbuffers | google_flatbuffers/python/flatbuffers/builder.py | python.flatbuffers.builder.BuilderSizeError | class BuilderSizeError(RuntimeError):
"""
Error caused by causing a Builder to exceed the hardcoded limit of 2
gigabytes.
"""
pass | class BuilderSizeError(RuntimeError):
'''
Error caused by causing a Builder to exceed the hardcoded limit of 2
gigabytes.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 6 | 0 | 2 | 1 | 1 | 4 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
15,167 | google/flatbuffers | google_flatbuffers/python/flatbuffers/builder.py | python.flatbuffers.builder.EndVectorLengthMismatched | class EndVectorLengthMismatched(RuntimeError):
"""
The number of elements passed to EndVector does not match the number
specified in StartVector.
"""
pass | class EndVectorLengthMismatched(RuntimeError):
'''
The number of elements passed to EndVector does not match the number
specified in StartVector.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 6 | 0 | 2 | 1 | 1 | 4 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
15,168 | google/flatbuffers | google_flatbuffers/python/flatbuffers/builder.py | python.flatbuffers.builder.IsNestedError | class IsNestedError(RuntimeError):
"""
Error caused by using a Builder to begin an Object when an Object is
already being built.
"""
pass | class IsNestedError(RuntimeError):
'''
Error caused by using a Builder to begin an Object when an Object is
already being built.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 6 | 0 | 2 | 1 | 1 | 4 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
15,169 | google/flatbuffers | google_flatbuffers/python/flatbuffers/builder.py | python.flatbuffers.builder.IsNotNestedError | class IsNotNestedError(RuntimeError):
"""
Error caused by using a Builder to write Object data when not inside
an Object.
"""
pass | class IsNotNestedError(RuntimeError):
'''
Error caused by using a Builder to write Object data when not inside
an Object.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 6 | 0 | 2 | 1 | 1 | 4 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
15,170 | google/flatbuffers | google_flatbuffers/python/flatbuffers/builder.py | python.flatbuffers.builder.OffsetArithmeticError | class OffsetArithmeticError(RuntimeError):
"""
Error caused by an Offset arithmetic error. Probably caused by bad
writing of fields. This is considered an unreachable situation in
normal circumstances.
"""
pass | class OffsetArithmeticError(RuntimeError):
'''
Error caused by an Offset arithmetic error. Probably caused by bad
writing of fields. This is considered an unreachable situation in
normal circumstances.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 7 | 0 | 2 | 1 | 1 | 5 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
15,171 | google/flatbuffers | google_flatbuffers/python/flatbuffers/builder.py | python.flatbuffers.builder.StructIsNotInlineError | class StructIsNotInlineError(RuntimeError):
"""
Error caused by using a Builder to write a Struct at a location that
is not the current Offset.
"""
pass | class StructIsNotInlineError(RuntimeError):
'''
Error caused by using a Builder to write a Struct at a location that
is not the current Offset.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 6 | 0 | 2 | 1 | 1 | 4 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
15,172 | google/flatbuffers | google_flatbuffers/python/flatbuffers/compat.py | python.flatbuffers.compat.NumpyRequiredForThisFeature | class NumpyRequiredForThisFeature(RuntimeError):
"""
Error raised when user tries to use a feature that
requires numpy without having numpy installed.
"""
pass | class NumpyRequiredForThisFeature(RuntimeError):
'''
Error raised when user tries to use a feature that
requires numpy without having numpy installed.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 6 | 0 | 2 | 1 | 1 | 4 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
15,173 | google/flatbuffers | google_flatbuffers/python/flatbuffers/flexbuffers.py | python.flatbuffers.flexbuffers.BitWidth | import enum
import struct
class BitWidth(enum.IntEnum):
"""Supported bit widths of value types.
These are used in the lower 2 bits of a type field to determine the size of
the elements (and or size field) of the item pointed to (e.g. vector).
"""
W8 = 0
W16 = 1
W32 = 2
W64 = 3
@st... |
class BitWidth(enum.IntEnum):
'''Supported bit widths of value types.
These are used in the lower 2 bits of a type field to determine the size of
the elements (and or size field) of the item pointed to (e.g. vector).
'''
@staticmethod
def U(value):
'''Returns the minimum `BitWidth` to e... | 9 | 4 | 10 | 0 | 7 | 3 | 3 | 0.57 | 1 | 1 | 0 | 0 | 0 | 0 | 4 | 59 | 57 | 6 | 35 | 13 | 26 | 20 | 22 | 9 | 17 | 5 | 3 | 1 | 10 |
15,174 | google/flatbuffers | google_flatbuffers/python/flatbuffers/flexbuffers.py | python.flatbuffers.flexbuffers.Blob | class Blob(Sized):
"""Data accessor for the encoded blob bytes."""
__slots__ = ()
@property
def Bytes(self):
return self._buf[0:len(self)]
def __repr__(self):
return 'Blob(%s, size=%d)' % (self._buf, len(self)) | class Blob(Sized):
'''Data accessor for the encoded blob bytes.'''
@property
def Bytes(self):
pass
def __repr__(self):
pass | 4 | 1 | 2 | 0 | 2 | 0 | 1 | 0.14 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 7 | 10 | 2 | 7 | 5 | 3 | 1 | 6 | 4 | 3 | 1 | 2 | 0 | 2 |
15,175 | google/flatbuffers | google_flatbuffers/python/flatbuffers/flexbuffers.py | python.flatbuffers.flexbuffers.Buf | class Buf:
"""Class to access underlying buffer object starting from the given offset."""
def __init__(self, buf, offset):
self._buf = buf
self._offset = offset if offset >= 0 else len(buf) + offset
self._length = len(buf) - self._offset
def __getitem__(self, key):
if isins... | class Buf:
'''Class to access underlying buffer object starting from the given offset.'''
def __init__(self, buf, offset):
pass
def __getitem__(self, key):
pass
def __setitem__(self, key, value):
pass
def __repr__(self):
pass
def Find(self, sub):
'''R... | 8 | 4 | 4 | 0 | 4 | 0 | 2 | 0.15 | 0 | 3 | 0 | 0 | 7 | 3 | 7 | 7 | 38 | 7 | 27 | 11 | 19 | 4 | 23 | 11 | 15 | 3 | 0 | 1 | 12 |
15,176 | google/flatbuffers | google_flatbuffers/python/flatbuffers/flexbuffers.py | python.flatbuffers.flexbuffers.Builder | import contextlib
import array
class Builder:
"""Helper class to encode structural data into flexbuffers format."""
def __init__(self, share_strings=False, share_keys=True, force_min_bit_width=BitWidth.W8):
self._share_strings = share_strings
self._share_keys = share_keys
self._force_m... |
class Builder:
'''Helper class to encode structural data into flexbuffers format.'''
def __init__(self, share_strings=False, share_keys=True, force_min_bit_width=BitWidth.W8):
pass
def __len__(self):
pass
@property
def StringPool(self):
pass
@property
def KeyPool(s... | 63 | 23 | 11 | 1 | 8 | 2 | 3 | 0.28 | 0 | 18 | 4 | 0 | 42 | 9 | 42 | 42 | 538 | 94 | 351 | 134 | 282 | 100 | 279 | 108 | 236 | 16 | 0 | 4 | 109 |
15,177 | google/flatbuffers | google_flatbuffers/python/flatbuffers/flexbuffers.py | python.flatbuffers.flexbuffers.Key | class Key(Object):
"""Data accessor for the encoded key bytes."""
__slots__ = ()
def __init__(self, buf, byte_width):
assert byte_width == 1
super().__init__(buf, byte_width)
@property
def Bytes(self):
return self._buf[0:len(self)]
def __len__(self):
return sel... | class Key(Object):
'''Data accessor for the encoded key bytes.'''
def __init__(self, buf, byte_width):
pass
@property
def Bytes(self):
pass
def __len__(self):
pass
def __str__(self):
pass
def __repr__(self):
pass | 7 | 1 | 2 | 0 | 2 | 0 | 1 | 0.07 | 1 | 1 | 0 | 0 | 5 | 0 | 5 | 7 | 20 | 5 | 14 | 8 | 7 | 1 | 13 | 7 | 7 | 1 | 1 | 0 | 5 |
15,178 | google/flatbuffers | google_flatbuffers/python/flatbuffers/flexbuffers.py | python.flatbuffers.flexbuffers.Map | class Map(Vector):
"""Data accessor for the encoded map bytes."""
@staticmethod
def CompareKeys(a, b):
if isinstance(a, Ref):
a = a.AsKeyBytes
if isinstance(b, Ref):
b = b.AsKeyBytes
return a < b
def __getitem__(self, key):
if isinstance(key, int... | class Map(Vector):
'''Data accessor for the encoded map bytes.'''
@staticmethod
def CompareKeys(a, b):
pass
def __getitem__(self, key):
pass
@property
def Keys(self):
pass
@property
def Values(self):
pass
@property
def Values(self):
pass
... | 11 | 1 | 4 | 0 | 4 | 0 | 2 | 0.04 | 1 | 7 | 3 | 0 | 5 | 0 | 6 | 14 | 37 | 8 | 28 | 14 | 17 | 1 | 24 | 10 | 17 | 3 | 3 | 1 | 10 |
15,179 | google/flatbuffers | google_flatbuffers/python/flatbuffers/flexbuffers.py | python.flatbuffers.flexbuffers.Object | class Object:
"""Base class for all non-trivial data accessors."""
__slots__ = ('_buf', '_byte_width')
def __init__(self, buf, byte_width):
self._buf = buf
self._byte_width = byte_width
@property
def ByteWidth(self):
return self._byte_width | class Object:
'''Base class for all non-trivial data accessors.'''
def __init__(self, buf, byte_width):
pass
@property
def ByteWidth(self):
pass | 4 | 1 | 3 | 0 | 3 | 0 | 1 | 0.13 | 0 | 0 | 0 | 2 | 2 | 2 | 2 | 2 | 11 | 2 | 8 | 7 | 4 | 1 | 7 | 6 | 4 | 1 | 0 | 0 | 2 |
15,180 | google/flatbuffers | google_flatbuffers/python/flatbuffers/flexbuffers.py | python.flatbuffers.flexbuffers.Pool | class Pool:
"""Collection of (data, offset) pairs sorted by data for quick access."""
def __init__(self):
self._pool = []
def FindOrInsert(self, data, offset):
do = (data, offset)
index = _BinarySearch(self._pool, do, lambda a, b: a[0] < b[0])
if index != -1:
_,... | class Pool:
'''Collection of (data, offset) pairs sorted by data for quick access.'''
def __init__(self):
pass
def FindOrInsert(self, data, offset):
pass
def Clear(self):
pass
@property
def Elements(self):
pass | 6 | 1 | 4 | 0 | 4 | 0 | 1 | 0.13 | 0 | 0 | 0 | 0 | 4 | 1 | 4 | 4 | 21 | 4 | 16 | 11 | 10 | 2 | 15 | 9 | 10 | 2 | 0 | 1 | 5 |
15,181 | google/flatbuffers | google_flatbuffers/python/flatbuffers/flexbuffers.py | python.flatbuffers.flexbuffers.Ref | class Ref:
"""Data accessor for the encoded data bytes."""
__slots__ = ('_buf', '_parent_width', '_byte_width', '_type')
@staticmethod
def PackedType(buf, parent_width, packed_type):
byte_width, type_ = Type.Unpack(packed_type)
return Ref(buf, parent_width, byte_width, type_)
def _... | class Ref:
'''Data accessor for the encoded data bytes.'''
@staticmethod
def PackedType(buf, parent_width, packed_type):
pass
def __init__(self, buf, parent_width, byte_width, type_):
pass
def __repr__(self):
pass
@property
def _Bytes(self):
pass
def _C... | 65 | 7 | 7 | 0 | 6 | 1 | 2 | 0.13 | 0 | 13 | 8 | 0 | 35 | 4 | 36 | 36 | 303 | 44 | 230 | 72 | 165 | 29 | 145 | 44 | 108 | 13 | 0 | 1 | 86 |
15,182 | google/flatbuffers | google_flatbuffers/python/flatbuffers/flexbuffers.py | python.flatbuffers.flexbuffers.Sized | class Sized(Object):
"""Base class for all data accessors which need to read encoded size."""
__slots__ = ('_size',)
def __init__(self, buf, byte_width, size=0):
super().__init__(buf, byte_width)
if size == 0:
self._size = _Unpack(U, self.SizeBytes)
else:
sel... | class Sized(Object):
'''Base class for all data accessors which need to read encoded size.'''
def __init__(self, buf, byte_width, size=0):
pass
@property
def SizeBytes(self):
pass
def __len__(self):
pass | 5 | 1 | 3 | 0 | 3 | 0 | 1 | 0.08 | 1 | 1 | 0 | 4 | 3 | 1 | 3 | 5 | 17 | 3 | 13 | 7 | 8 | 1 | 11 | 6 | 7 | 2 | 1 | 1 | 4 |
15,183 | google/flatbuffers | google_flatbuffers/python/flatbuffers/flexbuffers.py | python.flatbuffers.flexbuffers.String | class String(Sized):
"""Data accessor for the encoded string bytes."""
__slots__ = ()
@property
def Bytes(self):
return self._buf[0:len(self)]
def Mutate(self, value):
"""Mutates underlying string bytes in place.
Args:
value: New string to replace the existing on... | class String(Sized):
'''Data accessor for the encoded string bytes.'''
@property
def Bytes(self):
pass
def Mutate(self, value):
'''Mutates underlying string bytes in place.
Args:
value: New string to replace the existing one. New string must have less
or eq... | 6 | 2 | 6 | 1 | 4 | 2 | 1 | 0.5 | 1 | 1 | 0 | 0 | 4 | 1 | 4 | 9 | 33 | 6 | 18 | 10 | 12 | 9 | 17 | 8 | 12 | 2 | 2 | 1 | 5 |
15,184 | google/flatbuffers | google_flatbuffers/python/flatbuffers/flexbuffers.py | python.flatbuffers.flexbuffers.Type | import enum
class Type(enum.IntEnum):
"""Supported types of encoded data.
These are used as the upper 6 bits of a type field to indicate the actual
type.
"""
NULL = 0
INT = 1
UINT = 2
FLOAT = 3
KEY = 4
STRING = 5
INDIRECT_INT = 6
INDIRECT_UINT = 7
INDIRECT_FLOAT = 8... |
class Type(enum.IntEnum):
'''Supported types of encoded data.
These are used as the upper 6 bits of a type field to indicate the actual
type.
'''
@staticmethod
def Pack(type_, bit_width):
pass
@staticmethod
def Unpack(packed_type):
pass
@staticmethod
def IsInline... | 21 | 2 | 6 | 1 | 4 | 1 | 2 | 0.32 | 1 | 1 | 0 | 0 | 0 | 0 | 10 | 65 | 116 | 19 | 81 | 51 | 60 | 26 | 65 | 41 | 54 | 8 | 3 | 2 | 19 |
15,185 | google/flatbuffers | google_flatbuffers/python/flatbuffers/flexbuffers.py | python.flatbuffers.flexbuffers.TypedVector | class TypedVector(Sized):
"""Data accessor for the encoded typed vector or fixed typed vector bytes."""
__slots__ = ('_element_type', '_size')
def __init__(self, buf, byte_width, element_type, size=0):
super().__init__(buf, byte_width, size)
if element_type == Type.STRING:
eleme... | class TypedVector(Sized):
'''Data accessor for the encoded typed vector or fixed typed vector bytes.'''
def __init__(self, buf, byte_width, element_type, size=0):
pass
@property
def Bytes(self):
pass
@property
def ElementType(self):
pass
def __getitem__(self, index)... | 10 | 2 | 8 | 1 | 6 | 1 | 3 | 0.2 | 1 | 7 | 2 | 0 | 6 | 1 | 6 | 11 | 58 | 10 | 40 | 13 | 30 | 8 | 29 | 10 | 22 | 8 | 2 | 1 | 15 |
15,186 | google/flatbuffers | google_flatbuffers/python/flatbuffers/flexbuffers.py | python.flatbuffers.flexbuffers.Value | class Value:
"""Class to represent given value during the encoding process."""
@staticmethod
def Null():
return Value(0, Type.NULL, BitWidth.W8)
@staticmethod
def Bool(value):
return Value(value, Type.BOOL, BitWidth.W8)
@staticmethod
def Int(value, bit_width):
retu... | class Value:
'''Class to represent given value during the encoding process.'''
@staticmethod
def Null():
pass
@staticmethod
def Bool(value):
pass
@staticmethod
def Int(value, bit_width):
pass
@staticmethod
def UInt(value, bit_width):
pass
@staticme... | 25 | 1 | 3 | 0 | 3 | 0 | 1 | 0.13 | 0 | 3 | 1 | 0 | 9 | 3 | 15 | 15 | 75 | 16 | 52 | 31 | 27 | 7 | 42 | 22 | 26 | 4 | 0 | 2 | 19 |
15,187 | google/flatbuffers | google_flatbuffers/python/flatbuffers/flexbuffers.py | python.flatbuffers.flexbuffers.Vector | class Vector(Sized):
"""Data accessor for the encoded vector bytes."""
__slots__ = ()
def __getitem__(self, index):
if index < 0 or index >= len(self):
raise IndexError('vector index %s is out of [0, %d) range' % (index, len(self)))
packed_type = self._buf[len(self) * self._byte... | class Vector(Sized):
'''Data accessor for the encoded vector bytes.'''
def __getitem__(self, index):
pass
@property
def Value(self):
'''Returns the underlying encoded data as a list object.'''
pass
def __repr__(self):
pass | 5 | 2 | 5 | 0 | 4 | 0 | 1 | 0.13 | 1 | 2 | 1 | 1 | 3 | 0 | 3 | 8 | 21 | 4 | 15 | 8 | 10 | 2 | 12 | 7 | 8 | 2 | 2 | 1 | 4 |
15,188 | google/flatbuffers | google_flatbuffers/python/flatbuffers/number_types.py | python.flatbuffers.number_types.BoolFlags | from . import packer
class BoolFlags(object):
bytewidth = 1
min_val = False
max_val = True
py_type = bool
name = 'bool'
packer_type = packer.boolean |
class BoolFlags(object):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0 | 7 | 7 | 6 | 0 | 7 | 7 | 6 | 0 | 1 | 0 | 0 |
15,189 | google/flatbuffers | google_flatbuffers/python/flatbuffers/number_types.py | python.flatbuffers.number_types.Float32Flags | from . import packer
class Float32Flags(object):
bytewidth = 4
min_val = None
max_val = None
py_type = float
name = 'float32'
packer_type = packer.float32 |
class Float32Flags(object):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0 | 7 | 7 | 6 | 0 | 7 | 7 | 6 | 0 | 1 | 0 | 0 |
15,190 | google/flatbuffers | google_flatbuffers/python/flatbuffers/number_types.py | python.flatbuffers.number_types.Float64Flags | from . import packer
class Float64Flags(object):
bytewidth = 8
min_val = None
max_val = None
py_type = float
name = 'float64'
packer_type = packer.float64 |
class Float64Flags(object):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0 | 7 | 7 | 6 | 0 | 7 | 7 | 6 | 0 | 1 | 0 | 0 |
15,191 | google/flatbuffers | google_flatbuffers/python/flatbuffers/number_types.py | python.flatbuffers.number_types.Int16Flags | from . import packer
class Int16Flags(object):
bytewidth = 2
min_val = -2 ** 15
max_val = 2 ** 15 - 1
py_type = int
name = 'int16'
packer_type = packer.int16 |
class Int16Flags(object):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0 | 7 | 7 | 6 | 0 | 7 | 7 | 6 | 0 | 1 | 0 | 0 |
15,192 | google/flatbuffers | google_flatbuffers/python/flatbuffers/number_types.py | python.flatbuffers.number_types.Int32Flags | from . import packer
class Int32Flags(object):
bytewidth = 4
min_val = -2 ** 31
max_val = 2 ** 31 - 1
py_type = int
name = 'int32'
packer_type = packer.int32 |
class Int32Flags(object):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 7 | 0 | 7 | 7 | 6 | 0 | 7 | 7 | 6 | 0 | 1 | 0 | 0 |
15,193 | google/flatbuffers | google_flatbuffers/python/flatbuffers/number_types.py | python.flatbuffers.number_types.Int64Flags | from . import packer
class Int64Flags(object):
bytewidth = 8
min_val = -2 ** 63
max_val = 2 ** 63 - 1
py_type = int
name = 'int64'
packer_type = packer.int64 |
class Int64Flags(object):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0 | 7 | 7 | 6 | 0 | 7 | 7 | 6 | 0 | 1 | 0 | 0 |
15,194 | google/flatbuffers | google_flatbuffers/python/flatbuffers/number_types.py | python.flatbuffers.number_types.Int8Flags | from . import packer
class Int8Flags(object):
bytewidth = 1
min_val = -2 ** 7
max_val = 2 ** 7 - 1
py_type = int
name = 'int8'
packer_type = packer.int8 |
class Int8Flags(object):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0 | 7 | 7 | 6 | 0 | 7 | 7 | 6 | 0 | 1 | 0 | 0 |
15,195 | google/flatbuffers | google_flatbuffers/python/flatbuffers/number_types.py | python.flatbuffers.number_types.SOffsetTFlags | class SOffsetTFlags(Int32Flags):
pass | class SOffsetTFlags(Int32Flags):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 2 | 0 | 0 |
15,196 | google/flatbuffers | google_flatbuffers/python/flatbuffers/number_types.py | python.flatbuffers.number_types.UOffsetTFlags | class UOffsetTFlags(Uint32Flags):
pass | class UOffsetTFlags(Uint32Flags):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 2 | 0 | 0 |
15,197 | google/flatbuffers | google_flatbuffers/python/flatbuffers/number_types.py | python.flatbuffers.number_types.Uint16Flags | from . import packer
class Uint16Flags(object):
bytewidth = 2
min_val = 0
max_val = 2 ** 16 - 1
py_type = int
name = 'uint16'
packer_type = packer.uint16 |
class Uint16Flags(object):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 7 | 0 | 7 | 7 | 6 | 0 | 7 | 7 | 6 | 0 | 1 | 0 | 0 |
15,198 | google/flatbuffers | google_flatbuffers/python/flatbuffers/number_types.py | python.flatbuffers.number_types.Uint32Flags | from . import packer
class Uint32Flags(object):
bytewidth = 4
min_val = 0
max_val = 2 ** 32 - 1
py_type = int
name = 'uint32'
packer_type = packer.uint32 |
class Uint32Flags(object):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 7 | 0 | 7 | 7 | 6 | 0 | 7 | 7 | 6 | 0 | 1 | 0 | 0 |
15,199 | google/flatbuffers | google_flatbuffers/python/flatbuffers/number_types.py | python.flatbuffers.number_types.Uint64Flags | from . import packer
class Uint64Flags(object):
bytewidth = 8
min_val = 0
max_val = 2 ** 64 - 1
py_type = int
name = 'uint64'
packer_type = packer.uint64 |
class Uint64Flags(object):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0 | 7 | 7 | 6 | 0 | 7 | 7 | 6 | 0 | 1 | 0 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.