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
324,000
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/schema.py
followthemoney.schema.Schema
from banal import ensure_list, ensure_dict, as_bool from followthemoney.exc import InvalidData, InvalidModel from functools import cache from followthemoney.property import Property, PropertySpec, PropertyToDict, ReverseSpec from typing import TYPE_CHECKING, Any, cast from followthemoney.types import registry from typi...
class Schema: '''A type definition for a class of entities that have certain properties. Schemata are arranged in a multi-rooted hierarchy: each schema can have multiple parent schemata from which it inherits all of their properties. A schema can also have descendant child schemata, which, in turn, add...
39
20
14
1
10
3
3
0.28
0
11
4
0
24
29
24
24
418
54
286
103
245
79
206
87
181
21
0
4
80
324,001
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/schema.py
followthemoney.schema.SchemaSpec
from typing import Dict, List, Optional, Set, TypedDict, Union from followthemoney.property import Property, PropertySpec, PropertyToDict, ReverseSpec class SchemaSpec(TypedDict, total=False): label: str plural: str schemata: List[str] extends: List[str] properties: Dict[str, PropertySpec] feat...
class SchemaSpec(TypedDict, total=False): pass
1
0
0
0
0
0
0
0
2
0
0
0
0
0
0
0
17
0
17
1
16
0
17
1
16
0
1
0
0
324,002
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/schema.py
followthemoney.schema.SchemaToDict
from typing import Dict, List, Optional, Set, TypedDict, Union from followthemoney.property import Property, PropertySpec, PropertyToDict, ReverseSpec class SchemaToDict(TypedDict, total=False): label: str plural: str schemata: List[str] extends: List[str] properties: Dict[str, PropertyToDict] ...
class SchemaToDict(TypedDict, total=False): pass
1
0
0
0
0
0
0
0
2
0
0
0
0
0
0
0
17
0
17
1
16
0
17
1
16
0
1
0
0
324,003
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/schema.py
followthemoney.schema.TemporalExtentSpec
from typing import Dict, List, Optional, Set, TypedDict, Union class TemporalExtentSpec(TypedDict, total=False): start: List[str] end: List[str]
class TemporalExtentSpec(TypedDict, total=False): pass
1
0
0
0
0
0
0
0
2
0
0
0
0
0
0
0
3
0
3
1
2
0
3
1
2
0
1
0
0
324,004
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/statement/entity.py
followthemoney.statement.entity.StatementEntity
from typing import Generator, Iterable, Tuple, TypeVar from rigour.langs import LangStr from followthemoney.value import string_list, Values from hashlib import sha1 from followthemoney.property import Property from followthemoney.proxy import EntityProxy from followthemoney.exc import InvalidData from typing import An...
class StatementEntity(EntityProxy): '''An entity object that can link to a set of datasets that it is sourced from.''' def __init__(self, dataset: Dataset, data: Dict[str, Any], cleaned: bool=True): pass @property def _properties(self) -> Dict[str, List[str]]: pass def _iter_stmt(...
47
6
12
1
11
1
3
0.05
1
16
5
0
29
7
32
67
432
50
366
171
267
17
247
103
214
13
2
4
99
324,005
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/statement/serialize.py
followthemoney.statement.serialize.CSVStatementWriter
from followthemoney.statement.statement import Statement, StatementDict from typing import BinaryIO, Generator, Iterable, List, Optional, TextIO, Type import csv class CSVStatementWriter(StatementWriter): def __init__(self, fh: TextIO) -> None: self.fh = fh self.writer = csv.writer(self.fh, dialec...
class CSVStatementWriter(StatementWriter): def __init__(self, fh: TextIO) -> None: pass def write(self, stmt: Statement) -> None: pass def close(self) -> None: pass
4
0
5
0
5
0
2
0
1
4
1
0
3
3
3
7
18
2
16
8
12
0
16
8
12
2
2
1
5
324,006
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/statement/serialize.py
followthemoney.statement.serialize.JSONStatementWriter
import orjson from typing import BinaryIO, Generator, Iterable, List, Optional, TextIO, Type from followthemoney.statement.statement import Statement, StatementDict class JSONStatementWriter(StatementWriter): def __init__(self, fh: BinaryIO) -> None: self.fh = fh def write(self, stmt: Statement) -> N...
class JSONStatementWriter(StatementWriter): def __init__(self, fh: BinaryIO) -> None: pass def write(self, stmt: Statement) -> None: pass def close(self) -> None: pass
4
0
3
0
3
0
1
0
1
2
1
0
3
1
3
7
11
2
9
7
5
0
9
7
5
1
2
0
3
324,007
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/statement/serialize.py
followthemoney.statement.serialize.PackStatementWriter
from followthemoney.statement.statement import Statement, StatementDict from typing import BinaryIO, Generator, Iterable, List, Optional, TextIO, Type import csv class PackStatementWriter(StatementWriter): def __init__(self, fh: TextIO) -> None: self.fh = fh self.writer = csv.writer(self.fh, diale...
class PackStatementWriter(StatementWriter): def __init__(self, fh: TextIO) -> None: pass def write(self, stmt: Statement) -> None: pass def close(self) -> None: pass
4
0
15
0
15
1
2
0.04
1
4
1
0
3
3
3
7
49
2
45
9
41
2
17
9
13
3
2
1
6
324,008
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/statement/serialize.py
followthemoney.statement.serialize.StatementWriter
from types import TracebackType from typing import BinaryIO, Generator, Iterable, List, Optional, TextIO, Type from followthemoney.statement.statement import Statement, StatementDict class StatementWriter(object): def write(self, stmt: Statement) -> None: raise NotImplementedError() def close(self) -...
class StatementWriter(object): def write(self, stmt: Statement) -> None: pass def close(self) -> None: pass def __enter__(self) -> 'StatementWriter': pass def __exit__(self, type: Optional[Type[BaseException]], value: Optional[BaseException], traceback: Optional[TracebackTyp...
5
0
3
0
3
0
1
0
1
3
1
3
4
0
4
4
17
3
14
10
4
0
9
5
4
1
1
0
4
324,009
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/statement/statement.py
followthemoney.statement.statement.Statement
import hashlib from followthemoney.statement.util import get_prop_type, BASE_ID from typing_extensions import TypedDict, Self from sqlalchemy.engine import Row from rigour.time import datetime_iso, iso_datetime from typing import cast from rigour.boolean import bool_text from typing import Any, Dict, Generator, Optiona...
class Statement(object): '''A single statement about a property relevant to an entity. For example, this could be used to say: "In dataset A, entity X has the property `name` set to 'John Smith'. I first observed this at K, and last saw it at L." Null property values are not supported. This might n...
21
4
12
0
11
0
1
0.07
1
8
2
0
11
13
15
15
227
22
191
73
139
14
71
38
54
4
1
1
22
324,010
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/statement/statement.py
followthemoney.statement.statement.StatementDict
from typing import Any, Dict, Generator, Optional from typing_extensions import TypedDict, Self class StatementDict(TypedDict): id: Optional[str] entity_id: str canonical_id: str prop: str schema: str value: str dataset: str lang: Optional[str] original_value: Optional[str] exte...
class StatementDict(TypedDict): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
14
0
14
1
13
0
14
1
13
0
1
0
0
324,011
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/types/__init__.py
followthemoney.types.Registry
from followthemoney.types.email import EmailType from followthemoney.types.phone import PhoneType from followthemoney.types.string import StringType from followthemoney.types.common import PropertyType from followthemoney.types.language import LanguageType from followthemoney.types.url import UrlType from followthemone...
class Registry(object): '''This registry keeps the processing helpers for all property types in the system. The registry can be used to get a type, which can itself then clean, validate or format values of that type.''' def __init__(self) -> None: pass def get(self, name: str) -> Property...
5
3
8
0
7
1
3
0.15
1
3
1
0
4
4
4
4
60
5
48
32
43
7
48
32
43
6
1
2
10
324,012
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/types/address.py
followthemoney.types.address.AddressType
from rigour.text.distance import levenshtein_similarity import re from rigour.addresses import normalize_address from typing import Optional, TYPE_CHECKING from followthemoney.util import dampen, const from followthemoney.types.common import PropertyType from normality import slugify_text, squash_spaces from followthem...
class AddressType(PropertyType): '''A geographic address used to describe a location of a residence or post box. There is no specified order for the sub-parts of an address (e.g. street, city, postal code), and we should consider introducing an Address schema type to retain fidelity in cases where addr...
5
2
8
0
7
0
2
0.13
1
3
0
0
4
0
4
24
48
5
38
25
27
5
32
19
27
3
2
1
8
324,013
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/types/checksum.py
followthemoney.types.checksum.ChecksumType
from followthemoney.util import const, defer as _ from followthemoney.types.common import PropertyType class ChecksumType(PropertyType): """Content hashes calculated using SHA1. Checksum references are used by document-typed entities in Aleph to refer to raw data in the archive (e.g. the document from whic...
class ChecksumType(PropertyType): '''Content hashes calculated using SHA1. Checksum references are used by document-typed entities in Aleph to refer to raw data in the archive (e.g. the document from which the entity is extracted). Unfortunately, this has some security implications: in order to avoid p...
1
1
0
0
0
0
0
0.88
1
0
0
0
0
0
0
20
17
2
8
8
7
7
8
8
7
0
2
0
0
324,014
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/types/common.py
followthemoney.types.common.EnumType
from babel.core import Locale from typing import Any, Dict, Optional, Sequence, Callable, TYPE_CHECKING, TypedDict from followthemoney.util import get_locale, const class EnumType(PropertyType): """Enumerated type properties are used for types which have a defined set of possible values, like languages and cou...
class EnumType(PropertyType): '''Enumerated type properties are used for types which have a defined set of possible values, like languages and countries.''' def __init__(self) -> None: pass def _locale_names(self, locale: Locale) -> EnumValues: pass @property def names(sel...
9
6
6
0
5
1
1
0.26
1
6
1
4
7
2
7
27
51
7
35
22
18
9
26
13
18
2
2
1
10
324,015
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/types/common.py
followthemoney.types.common.PropertyType
from normality import stringify from banal import ensure_list from itertools import product from followthemoney.util import gettext, sanitize_text from typing import Any, Dict, Optional, Sequence, Callable, TYPE_CHECKING, TypedDict from followthemoney.value import Value from inspect import cleandoc from followthemoney....
class PropertyType(object): '''Base class for all property types.''' @property def docs(self) -> Optional[str]: pass def validate(self, value: str, fuzzy: bool=False, format: Optional[str]=None) -> bool: '''Returns a boolean to indicate if the given value is a valid instance of ...
22
15
6
0
5
2
2
0.54
1
9
1
15
20
0
20
20
191
29
106
54
65
57
81
34
60
4
1
1
32
324,016
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/types/common.py
followthemoney.types.common.PropertyTypeToDict
from typing import Any, Dict, Optional, Sequence, Callable, TYPE_CHECKING, TypedDict class PropertyTypeToDict(TypedDict, total=False): label: str plural: str description: Optional[str] maxLength: int group: Optional[str] matchable: Optional[bool] pivot: Optional[bool] values: Optional[E...
class PropertyTypeToDict(TypedDict, total=False): pass
1
0
0
0
0
0
0
0
2
0
0
0
0
0
0
0
9
0
9
1
8
0
9
1
8
0
1
0
0
324,017
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/types/country.py
followthemoney.types.country.CountryType
from rigour.territories import get_ftm_countries, lookup_territory from followthemoney.util import const, defer as _ from babel.core import Locale from followthemoney.types.common import EnumType, EnumValues from typing import Optional, TYPE_CHECKING class CountryType(EnumType): """Properties to define countries a...
class CountryType(EnumType): '''Properties to define countries and territories. This is completely descriptive and needs to deal with data from many origins, so we support a number of unusual and controversial designations (e.g. the Soviet Union, Transnistria, Somaliland, Kosovo).''' def _locale_n...
4
2
7
0
6
1
2
0.29
1
3
0
0
3
0
3
30
36
5
24
18
14
7
18
12
14
3
3
2
5
324,018
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/types/date.py
followthemoney.types.date.DateType
from typing import Optional, TYPE_CHECKING from prefixdate import parse, parse_format, Precision from followthemoney.util import dampen, const import os from datetime import datetime, timezone from followthemoney.util import defer as _ from followthemoney.types.common import PropertyType class DateType(PropertyType): ...
class DateType(PropertyType): '''A date or time stamp. This is based on ISO 8601, but meant to allow for different degrees of precision by specifying a prefix. This means that `2021`, `2021-02`, `2021-02-16`, `2021-02-16T21`, `2021-02-16T21:48` and `2021-02-16T21:48:52` are all valid values, with an im...
7
5
9
1
5
3
2
0.62
1
5
0
0
6
0
6
26
75
12
39
24
24
24
30
16
23
3
2
1
10
324,019
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/types/email.py
followthemoney.types.email.EmailType
from rigour.env import ENCODING from followthemoney.util import defer as _ from followthemoney.types.common import PropertyType import re from typing import Optional, TYPE_CHECKING class EmailType(PropertyType): """Internet mail address (e.g. user@example.com). These are notoriously hard to validate, but we us...
class EmailType(PropertyType): '''Internet mail address (e.g. user@example.com). These are notoriously hard to validate, but we use an irresponsibly simple rule and hope for the best.''' def clean_domain_part(self, domain: str) -> Optional[str]: '''Clean and normalize the domain part of the email....
4
4
18
2
11
5
3
0.56
1
4
0
0
3
0
3
23
79
12
43
23
31
24
35
15
31
5
2
2
9
324,020
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/types/entity.py
followthemoney.types.entity.EntityType
from followthemoney.util import const, gettext, defer as _ from followthemoney.exc import InvalidData from typing import Any, Optional, TYPE_CHECKING from followthemoney.types.common import PropertyType from followthemoney.util import ENTITY_ID_LEN, get_entity_id, sanitize_text import re from followthemoney.value impor...
class EntityType(PropertyType): '''A reference to another entity via its ID. This is how entities in FtM become a graph: by pointing at each other using references. Entity IDs can either be `namespaced` or `plain`, depending on the context. When setting properties of this type, you can pass in an entit...
4
2
11
0
10
1
2
0.22
1
4
1
0
3
0
3
23
55
5
41
30
23
9
27
16
23
3
2
1
7
324,021
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/types/gender.py
followthemoney.types.gender.GenderType
from typing import Optional, TYPE_CHECKING from followthemoney.types.common import EnumType, EnumValues from babel.core import Locale from followthemoney.util import const, gettext, defer as _ class GenderType(EnumType): """A human gender. This is not meant to be a comprehensive model of the social realities o...
class GenderType(EnumType): '''A human gender. This is not meant to be a comprehensive model of the social realities of gender but a way to capture data from (mostly) government databases and represent it in a way that can be used by structured tools. I'm not sure this justifies the simplification.''' ...
3
1
9
0
9
0
2
0.09
1
3
0
0
2
0
2
29
52
5
43
20
34
4
19
14
16
2
3
1
3
324,022
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/types/identifier.py
followthemoney.types.identifier.IdentifierType
import re from followthemoney.util import dampen, shortest, longest from followthemoney.types.common import PropertyType from followthemoney.util import const, defer as _ from rigour.ids import get_identifier_format_names, get_identifier_format from typing import Optional, TYPE_CHECKING class IdentifierType(PropertyTy...
class IdentifierType(PropertyType): '''Used for registration numbers and other codes assigned by an authority to identify an entity. This might include tax identifiers and statistical codes. Since identifiers are high-value criteria when comparing two entities, numbers should only be modelled as id...
7
1
5
0
5
0
2
0.17
1
3
0
0
6
0
6
26
55
8
40
23
27
7
33
17
26
3
2
1
10
324,023
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/types/ip.py
followthemoney.types.ip.IpType
from typing import Optional, TYPE_CHECKING from ipaddress import ip_address from followthemoney.util import const, defer as _ from followthemoney.types.common import PropertyType class IpType(PropertyType): """Internet protocol addresses. This supports both addresses used by the protocol versions 4 (e.g. `192....
class IpType(PropertyType): '''Internet protocol addresses. This supports both addresses used by the protocol versions 4 (e.g. `192.168.1.143`) and 6 (e.g. `0:0:0:0:0:ffff:c0a8:18f`).''' def validate(self, value: str, fuzzy: bool=False, format: Optional[str]=None) -> bool: '''Check to see if t...
3
3
11
0
10
2
2
0.22
1
3
0
0
2
0
2
22
36
3
27
18
16
6
19
10
16
2
2
1
4
324,024
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/types/json.py
followthemoney.types.json.JsonType
from followthemoney.types.common import PropertyType from typing import Any, Optional, Sequence, TYPE_CHECKING from followthemoney.util import const, sanitize_text, defer as _ from banal import ensure_list import json class JsonType(PropertyType): """An encoded JSON object. This is used to store raw HTTP headers f...
class JsonType(PropertyType): '''An encoded JSON object. This is used to store raw HTTP headers for documents and some other edge cases. It's a really bad idea and we should try to get rid of JSON properties.''' def pack(self, obj: Any) -> Optional[str]: '''Encode a given value to JSON.''' ...
6
4
6
0
6
1
2
0.21
1
4
0
0
5
0
5
25
47
6
34
18
22
7
27
12
21
2
2
1
9
324,025
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/types/language.py
followthemoney.types.language.LanguageType
from babel.core import Locale from followthemoney.util import const, get_env_list from followthemoney.types.common import EnumType, EnumValues from rigour.langs import iso_639_alpha3 from followthemoney.util import defer as _, gettext from typing import Optional, TYPE_CHECKING class LanguageType(EnumType): """A hu...
class LanguageType(EnumType): '''A human written language. This list is arbitrarily limited for some weird upstream technical reasons, but we'll happily accept pull requests for additional languages once there is a specific need for them to be supported.''' def _locale_names(self, locale: Locale) ...
3
1
13
0
13
0
4
0.05
1
3
0
0
2
0
2
29
109
4
100
20
91
5
25
14
22
5
3
2
7
324,026
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/types/mimetype.py
followthemoney.types.mimetype.MimeType
from rigour.mime import DEFAULT from typing import Optional, TYPE_CHECKING from followthemoney.util import const, defer as _ from followthemoney.types.common import PropertyType from rigour.mime import normalize_mimetype, parse_mimetype class MimeType(PropertyType): """A MIME media type are a specification of a co...
class MimeType(PropertyType): '''A MIME media type are a specification of a content type on a network. Each MIME type is assigned by IANA and consists of two parts: the type and sub-type. Common examples are: `text/plain`, `application/json` and `application/pdf`. MIME type properties do not contai...
3
1
7
0
7
0
2
0.32
1
2
0
0
2
0
2
22
29
4
19
14
10
6
13
8
10
2
2
1
3
324,027
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/types/name.py
followthemoney.types.name.NameType
from followthemoney.types.common import PropertyType from typing import TYPE_CHECKING, Optional, Sequence from rigour.names import pick_name, tokenize_name from followthemoney.util import dampen from normality import slugify_text from normality.cleaning import squash_spaces, strip_quotes from rigour.text.distance impor...
class NameType(PropertyType): '''A name used for a person or company. This is assumed to be as complete a name as available - when a first name, family name or patronymic are given separately, these are stored to string-type properties instead. No validation rules apply, and things having multiple name...
6
4
7
0
7
1
2
0.22
1
4
0
0
5
0
5
25
57
7
41
23
29
9
31
17
25
3
2
1
9
324,028
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/types/number.py
followthemoney.types.number.NumberType
from followthemoney.util import const, defer as _ from followthemoney.types.common import PropertyType from typing import Optional, Tuple import re class NumberType(PropertyType): """A numeric value, like the size of a piece of land, or the value of a contract. Since all property values in FtM are strings, thi...
class NumberType(PropertyType): '''A numeric value, like the size of a piece of land, or the value of a contract. Since all property values in FtM are strings, this is also a string and there is no specified format (e.g. `1,000.00` vs. `1.000,00`). In the future we might want to enable annotations for ...
5
4
20
2
11
7
4
0.54
1
5
0
0
4
0
4
24
105
14
59
23
52
32
53
21
48
6
2
2
16
324,029
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/types/phone.py
followthemoney.types.phone.PhoneType
from followthemoney.types.common import PropertyType from phonenumbers import is_valid_number, format_number from typing import Iterable, Optional, TYPE_CHECKING from followthemoney.util import const, dampen from phonenumbers.phonenumberutil import region_code_for_number, NumberParseException from phonenumbers import P...
class PhoneType(PropertyType): '''A phone number in E.164 format. This means that phone numbers always include an international country prefix (e.g. `+38760183628`). The cleaning and validation functions for this try to be smart about by accepting a list of countries as an argument in order to add the ...
9
2
8
0
7
1
2
0.28
1
3
0
0
8
0
8
28
90
12
61
36
40
17
49
24
40
3
2
2
19
324,030
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/types/string.py
followthemoney.types.string.HTMLType
from followthemoney.util import const, defer as _ from followthemoney.util import MEGABYTE class HTMLType(StringType): """Properties that contain raw hypertext markup (HTML). User interfaces rendering properties of this type need to take extreme care not to allow attacks such as cross-site scripting. It i...
class HTMLType(StringType): '''Properties that contain raw hypertext markup (HTML). User interfaces rendering properties of this type need to take extreme care not to allow attacks such as cross-site scripting. It is recommended to perform server-side sanitisation, or to not render this property at all...
1
1
0
0
0
0
0
0.83
1
0
0
0
0
0
0
21
13
2
6
6
5
5
6
6
5
0
3
0
0
324,031
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/types/string.py
followthemoney.types.string.StringType
from followthemoney.types.common import PropertyType from followthemoney.util import const, defer as _ class StringType(PropertyType): """A simple string property with no additional semantics.""" name = const('string') label = _('Label') plural = _('Labels') matchable = False max_length = 1024 ...
class StringType(PropertyType): '''A simple string property with no additional semantics.''' def node_id(self, value: str) -> None: pass
2
1
2
0
2
0
1
0.13
1
1
0
2
1
0
1
21
11
2
8
7
6
1
8
7
6
1
2
0
1
324,032
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/types/string.py
followthemoney.types.string.TextType
from followthemoney.util import MEGABYTE from followthemoney.util import const, defer as _ class TextType(StringType): """Longer text fragments, such as descriptions or document text. Unlike string properties, it might make sense to treat properties of this type as full-text search material.""" name = ...
class TextType(StringType): '''Longer text fragments, such as descriptions or document text. Unlike string properties, it might make sense to treat properties of this type as full-text search material.''' pass
1
1
0
0
0
0
0
0.5
1
0
0
0
0
0
0
21
10
1
6
6
5
3
6
6
5
0
3
0
0
324,033
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/types/topic.py
followthemoney.types.topic.TopicType
from babel.core import Locale from followthemoney.types.common import EnumType, EnumValues from followthemoney.util import const, gettext, defer as _ class TopicType(EnumType): """Topics define a controlled vocabulary of terms applicable to some entities, such as companies and people. They describe categories ...
class TopicType(EnumType): '''Topics define a controlled vocabulary of terms applicable to some entities, such as companies and people. They describe categories of journalistic interest which may apply to the given entity, for example if a given person is a criminal or a politician. Besides the inf...
2
1
2
0
2
0
1
0.09
1
1
0
0
1
0
1
28
117
5
103
10
101
9
11
10
9
1
3
0
1
324,034
opensanctions/followthemoney
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/types/url.py
followthemoney.types.url.UrlType
from followthemoney.types.common import PropertyType from typing import Optional, TYPE_CHECKING from rigour.urls import clean_url, compare_urls from followthemoney.util import const, dampen, defer as _ class UrlType(PropertyType): """A uniform resource locator (URL). This will perform some normalisation on the...
class UrlType(PropertyType): '''A uniform resource locator (URL). This will perform some normalisation on the URL so that it's sure to be using valid encoding/quoting, and to make sure the URL has a schema (e.g. `http`, `https`, ...).''' def clean_text(self, text: str, fuzzy: bool=False, format: Optio...
4
3
5
0
4
1
1
0.32
1
3
0
0
3
0
3
23
34
5
22
19
12
7
16
13
12
1
2
0
3
324,035
abhishekbhakat/airflow-mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/abhishekbhakat_airflow-mcp-server/airflow-mcp-plugin/src/airflow_mcp_plugin/plugin.py
airflow_mcp_plugin.plugin.AirflowMCPPlugin
from airflow.plugins_manager import AirflowPlugin class AirflowMCPPlugin(AirflowPlugin): name = 'airflow_mcp_plugin' def on_load(self, *args, **kwargs): pass @property def fastapi_apps(self): stateless = StatelessMCPMount(path='/') return [{'app': stateless, 'url_prefix': '/mc...
class AirflowMCPPlugin(AirflowPlugin): def on_load(self, *args, **kwargs): pass @property def fastapi_apps(self): pass
4
0
3
0
3
1
1
0.13
1
1
1
0
2
0
2
2
11
2
8
6
4
1
7
5
4
1
1
0
2
324,036
abhishekbhakat/airflow-mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/abhishekbhakat_airflow-mcp-server/airflow-mcp-plugin/src/airflow_mcp_plugin/plugin.py
airflow_mcp_plugin.plugin.StatelessMCPMount
import httpx import asyncio from starlette.responses import JSONResponse, Response from starlette.applications import Starlette from starlette.requests import Request from fastmcp.experimental.server.openapi import FastMCPOpenAPI, MCPType, RouteMap class StatelessMCPMount: """FastAPI-compatible object that creates...
class StatelessMCPMount: '''FastAPI-compatible object that creates a stateless MCP server. Every request must include Authorization: Bearer <token>. The token is forwarded to Airflow APIs for that specific request. Uses static tools (no hierarchical discovery) and stateless HTTP. ''' def __ini...
7
3
18
2
15
1
4
0.14
0
3
0
0
4
3
4
4
113
16
85
35
78
12
70
34
63
12
0
5
22
324,037
abhishekbhakat/airflow-mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/abhishekbhakat_airflow-mcp-server/src/airflow_mcp_server/config.py
airflow_mcp_server.config.AirflowConfig
class AirflowConfig: """Centralized configuration for Airflow MCP server.""" def __init__(self, base_url: str | None=None, auth_token: str | None=None) -> None: """Initialize configuration with provided values. Args: base_url: Airflow API base URL auth_token: Authentica...
class AirflowConfig: '''Centralized configuration for Airflow MCP server.''' def __init__(self, base_url: str | None=None, auth_token: str | None=None) -> None: '''Initialize configuration with provided values. Args: base_url: Airflow API base URL auth_token: Authenticat...
2
2
17
3
7
7
3
1
0
2
0
0
1
2
1
1
20
4
8
4
6
8
8
4
6
3
0
1
3
324,038
abhishekbhakat/airflow-mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/abhishekbhakat_airflow-mcp-server/src/airflow_mcp_server/hierarchical_manager.py
airflow_mcp_server.hierarchical_manager.HierarchicalToolManager
import httpx from .utils.category_mapper import extract_categories_from_openapi, filter_routes_by_methods, get_category_info, get_category_tools_info from fastmcp.server.openapi import MCPType, RouteMap from fastmcp import Context, FastMCP class HierarchicalToolManager: """Manages dynamic tool state transitions fo...
class HierarchicalToolManager: '''Manages dynamic tool state transitions for hierarchical discovery.''' def __init__(self, mcp: FastMCP, openapi_spec: dict, client: httpx.AsyncClient, allowed_methods: set[str] | None=None): '''Initialize hierarchical tool manager. Args: mcp: FastMC...
19
15
15
3
8
4
2
0.47
0
5
0
0
10
8
10
10
206
52
105
52
86
49
94
46
79
5
0
3
27
324,039
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/api/dependencies.py
blockscout_mcp_server.api.dependencies.MockCtx
class MockCtx: """A mock context for stateless REST calls. Tool functions require a ``ctx`` object to report progress. Since REST endpoints are stateless and have no MCP session, this mock provides the required ``info`` and ``report_progress`` methods as no-op async functions. It also exposes a ``r...
class MockCtx: '''A mock context for stateless REST calls. Tool functions require a ``ctx`` object to report progress. Since REST endpoints are stateless and have no MCP session, this mock provides the required ``info`` and ``report_progress`` methods as no-op async functions. It also exposes a ``re...
4
3
3
0
2
1
1
1.25
0
2
1
0
3
2
3
3
22
4
8
6
4
10
8
6
4
2
0
0
4
324,040
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/api/dependencies.py
blockscout_mcp_server.api.dependencies._RequestContextWrapper
class _RequestContextWrapper: """Lightweight wrapper to mimic MCP's request_context shape for analytics.""" def __init__(self, request: Request) -> None: self.request: Request = request
class _RequestContextWrapper: '''Lightweight wrapper to mimic MCP's request_context shape for analytics.''' def __init__(self, request: Request) -> None: pass
2
1
2
0
2
0
1
0.33
0
0
0
0
1
1
1
1
5
1
3
3
1
1
3
3
1
1
0
0
1
324,041
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/cache.py
blockscout_mcp_server.cache.CachedContract
from pydantic import BaseModel, Field class CachedContract(BaseModel): """Represents the pre-processed and cached data for a smart contract.""" metadata: dict = Field(description='The processed metadata of the contract, with large fields removed.') source_files: dict[str, str] = Field(description='A map of...
class CachedContract(BaseModel): '''Represents the pre-processed and cached data for a smart contract.''' pass
1
1
0
0
0
0
0
0.33
1
0
0
0
0
0
0
82
5
1
3
3
2
1
3
3
2
0
5
0
0
324,042
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/cache.py
blockscout_mcp_server.cache.ChainCache
from blockscout_mcp_server.config import config import time import anyio class ChainCache: def __init__(self) -> None: self._cache: dict[str, tuple[str | None, float]] = {} self._locks_lock = anyio.Lock() self._locks: dict[str, anyio.Lock] = {} async def _get_or_create_lock(self, chai...
class ChainCache: def __init__(self) -> None: pass async def _get_or_create_lock(self, chain_id: str) -> anyio.Lock: '''Get or create a lock for a specific chain.''' pass @property def _lock_keys(self) -> set[str]: '''Return a snapshot of chain IDs with initialized loc...
11
7
6
0
5
1
1
0.22
0
5
0
0
8
3
8
8
60
10
41
23
30
9
40
20
30
3
0
2
13
324,043
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/cache.py
blockscout_mcp_server.cache.ChainsListCache
from blockscout_mcp_server.config import config from blockscout_mcp_server.models import ChainInfo import time import anyio class ChainsListCache: """In-process TTL cache for the chains list.""" def __init__(self) -> None: self.chains_snapshot: list[ChainInfo] | None = None self.expiry_timesta...
class ChainsListCache: '''In-process TTL cache for the chains list.''' def __init__(self) -> None: pass def get_if_fresh(self) -> list[ChainInfo] | None: '''Return cached chains if the snapshot is still fresh.''' pass def needs_refresh(self) -> bool: '''Return ``True`...
5
4
4
0
3
1
1
0.29
0
4
1
0
4
3
4
4
22
4
14
8
9
4
14
8
9
2
0
1
5
324,044
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/cache.py
blockscout_mcp_server.cache.ContractCache
import time from blockscout_mcp_server.config import config import anyio from collections import OrderedDict class ContractCache: """In-process, thread-safe, LRU, TTL cache for processed contract data.""" def __init__(self) -> None: self._cache: OrderedDict[str, tuple[CachedContract, float]] = Ordered...
class ContractCache: '''In-process, thread-safe, LRU, TTL cache for processed contract data.''' def __init__(self) -> None: pass async def get(self, key: str) -> CachedContract | None: '''Retrieve an entry from the cache if it exists and is fresh.''' pass async def set(self, ...
4
3
8
0
7
1
2
0.13
0
5
1
0
3
4
3
3
29
3
23
10
19
3
23
10
19
3
0
2
6
324,045
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/client_meta.py
blockscout_mcp_server.client_meta.ClientMeta
from dataclasses import dataclass @dataclass class ClientMeta: name: str version: str protocol: str user_agent: str
@dataclass class ClientMeta: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
5
0
5
1
4
0
5
1
4
0
0
0
0
324,046
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/config.py
blockscout_mcp_server.config.ServerConfig
from pydantic_settings import BaseSettings, SettingsConfigDict from pydantic import Field class ServerConfig(BaseSettings): model_config = SettingsConfigDict(env_prefix='BLOCKSCOUT_', env_file='.env', env_file_encoding='utf-8') bs_api_key: str = '' bs_timeout: float = 120.0 bs_request_max_retries: int ...
class ServerConfig(BaseSettings): pass
1
0
0
0
0
0
0
0.81
1
0
0
0
0
0
0
0
48
12
27
27
26
22
27
27
26
0
1
0
0
324,047
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.AddressInfoData
from pydantic import BaseModel, ConfigDict, Field from typing import Any, Generic, TypeVar class AddressInfoData(BaseModel): """A structured representation of the combined address information.""" basic_info: dict[str, Any] = Field(description='Core on-chain data for the address from the Blockscout API.') m...
class AddressInfoData(BaseModel): '''A structured representation of the combined address information.''' pass
1
1
0
0
0
0
0
0.17
1
0
0
0
0
0
0
82
8
1
6
3
5
1
3
3
2
0
5
0
0
324,048
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.AddressLogItem
from pydantic import BaseModel, ConfigDict, Field class AddressLogItem(LogItemBase): """Represents a single log item when the address is redundant.""" transaction_hash: str | None = Field(None, description='The transaction that triggered the event.')
class AddressLogItem(LogItemBase): '''Represents a single log item when the address is redundant.''' pass
1
1
0
0
0
0
0
0.5
1
0
0
0
0
0
0
82
4
1
2
2
1
1
2
2
1
0
6
0
0
324,049
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.AdvancedFilterItem
from pydantic import BaseModel, ConfigDict, Field class AdvancedFilterItem(BaseModel): """Represents a single item from the advanced filter API response.""" model_config = ConfigDict(extra='allow') from_address: str | None = Field(default=None, alias='from', description='The sender address.') to_addres...
class AdvancedFilterItem(BaseModel): '''Represents a single item from the advanced filter API response.''' pass
1
1
0
0
0
0
0
0.17
1
0
0
0
0
0
0
82
15
2
12
4
11
2
4
4
3
0
5
0
0
324,050
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.BlockInfoData
from typing import Any, Generic, TypeVar from pydantic import BaseModel, ConfigDict, Field class BlockInfoData(BaseModel): """A structured representation of a block's information.""" model_config = ConfigDict(extra='allow') block_details: dict[str, Any] = Field(description='A dictionary containing the deta...
class BlockInfoData(BaseModel): '''A structured representation of a block's information.''' pass
1
1
0
0
0
0
0
0.33
1
0
0
0
0
0
0
82
9
2
6
4
5
2
4
4
3
0
5
0
0
324,051
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.ChainIdGuidance
from pydantic import BaseModel, ConfigDict, Field class ChainIdGuidance(BaseModel): """A structured representation of chain ID guidance combining rules and recommendations.""" rules: str = Field(description='Rules for chain ID selection and usage.') recommended_chains: list[ChainInfo] = Field(description='...
class ChainIdGuidance(BaseModel): '''A structured representation of chain ID guidance combining rules and recommendations.''' pass
1
1
0
0
0
0
0
0.2
1
0
0
0
0
0
0
82
7
1
5
3
4
1
3
3
2
0
5
0
0
324,052
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.ChainInfo
from pydantic import BaseModel, ConfigDict, Field class ChainInfo(BaseModel): """Represents a blockchain with its essential identifiers.""" name: str = Field(description="The common name of the blockchain (e.g., 'Ethereum').") chain_id: str = Field(description='The unique identifier for the chain.') is...
class ChainInfo(BaseModel): '''Represents a blockchain with its essential identifiers.''' pass
1
1
0
0
0
0
0
0.08
1
0
0
0
0
0
0
82
14
1
12
7
11
1
7
7
6
0
5
0
0
324,053
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.ContractAbiData
from pydantic import BaseModel, ConfigDict, Field from typing import Any, Generic, TypeVar class ContractAbiData(BaseModel): """A structured representation of a smart contract's ABI.""" abi: list[dict[str, Any]] | None = Field(description='The Application Binary Interface (ABI) of the smart contract.')
class ContractAbiData(BaseModel): '''A structured representation of a smart contract's ABI.''' pass
1
1
0
0
0
0
0
0.25
1
0
0
0
0
0
0
82
6
1
4
2
3
1
2
2
1
0
5
0
0
324,054
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.ContractMetadata
from pydantic import BaseModel, ConfigDict, Field class ContractMetadata(BaseModel): """Detailed metadata for a verified smart contract.""" model_config = ConfigDict(extra='allow') name: str = Field(description='The name of the contract.') language: str | None = Field(description='The programming langu...
class ContractMetadata(BaseModel): '''Detailed metadata for a verified smart contract.''' pass
1
1
0
0
0
0
0
0.14
1
0
0
0
0
0
0
82
29
4
22
16
21
3
16
16
15
0
5
0
0
324,055
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.ContractReadData
from pydantic import BaseModel, ConfigDict, Field from typing import Any, Generic, TypeVar class ContractReadData(BaseModel): """Result of a read-only smart contract function call.""" result: Any = Field(description='Return value from the contract function call.')
class ContractReadData(BaseModel): '''Result of a read-only smart contract function call.''' pass
1
1
0
0
0
0
0
0.5
1
0
0
0
0
0
0
82
4
1
2
2
1
1
2
2
1
0
5
0
0
324,056
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.ContractSourceFile
from pydantic import BaseModel, ConfigDict, Field class ContractSourceFile(BaseModel): """Container for a single contract source file.""" file_content: str = Field(description='The raw source code of the file.')
class ContractSourceFile(BaseModel): '''Container for a single contract source file.''' pass
1
1
0
0
0
0
0
0.5
1
0
0
0
0
0
0
82
4
1
2
2
1
1
2
2
1
0
5
0
0
324,057
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.DecodedInput
from pydantic import BaseModel, ConfigDict, Field from typing import Any, Generic, TypeVar class DecodedInput(BaseModel): """Represents the decoded input data of a transaction.""" model_config = ConfigDict(extra='allow') method_call: str = Field(description='Name of the called method.') method_id: str ...
class DecodedInput(BaseModel): '''Represents the decoded input data of a transaction.''' pass
1
1
0
0
0
0
0
0.4
1
0
0
0
0
0
0
82
8
2
5
5
4
2
5
5
4
0
5
0
0
324,058
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.DirectApiCommonGroup
from pydantic import BaseModel, ConfigDict, Field class DirectApiCommonGroup(BaseModel): """Represents a group of common endpoints available on all chains.""" group: str = Field(description="The functional group name (e.g., 'Stats', 'Tokens & NFTs').") endpoints: list[DirectApiEndpoint] = Field(description...
class DirectApiCommonGroup(BaseModel): '''Represents a group of common endpoints available on all chains.''' pass
1
1
0
0
0
0
0
0.33
1
0
0
0
0
0
0
82
5
1
3
3
2
1
3
3
2
0
5
0
0
324,059
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.DirectApiData
from pydantic import BaseModel, ConfigDict, Field class DirectApiData(BaseModel): """Generic container for direct API responses.""" model_config = ConfigDict(extra='allow')
class DirectApiData(BaseModel): '''Generic container for direct API responses.''' pass
1
1
0
0
0
0
0
0.5
1
0
0
0
0
0
0
82
4
1
2
2
1
1
2
2
1
0
5
0
0
324,060
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.DirectApiEndpoint
from pydantic import BaseModel, ConfigDict, Field class DirectApiEndpoint(BaseModel): """Represents a single direct API endpoint.""" path: str = Field(description="The API endpoint path (e.g., '/api/v2/stats').") description: str = Field(description='A description of what this endpoint returns.')
class DirectApiEndpoint(BaseModel): '''Represents a single direct API endpoint.''' pass
1
1
0
0
0
0
0
0.33
1
0
0
0
0
0
0
82
5
1
3
3
2
1
3
3
2
0
5
0
0
324,061
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.DirectApiEndpointList
from pydantic import BaseModel, ConfigDict, Field class DirectApiEndpointList(BaseModel): """Contains the complete curated list of endpoints for direct_api_call tool.""" common: list[DirectApiCommonGroup] = Field(description='Endpoint groups available on all supported chains.') specific: list[DirectApiSpec...
class DirectApiEndpointList(BaseModel): '''Contains the complete curated list of endpoints for direct_api_call tool.''' pass
1
1
0
0
0
0
0
0.33
1
0
0
0
0
0
0
82
5
1
3
3
2
1
3
3
2
0
5
0
0
324,062
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.DirectApiSpecificGroup
from pydantic import BaseModel, ConfigDict, Field class DirectApiSpecificGroup(BaseModel): """Represents a group of endpoints specific to certain chain families.""" chain_family: str = Field(description="The chain family this group applies to (e.g., 'Arbitrum', 'Optimism').") endpoints: list[DirectApiEndpo...
class DirectApiSpecificGroup(BaseModel): '''Represents a group of endpoints specific to certain chain families.''' pass
1
1
0
0
0
0
0
0.33
1
0
0
0
0
0
0
82
5
1
3
3
2
1
3
3
2
0
5
0
0
324,063
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.EnsAddressData
from pydantic import BaseModel, ConfigDict, Field class EnsAddressData(BaseModel): """A structured representation of an ENS name resolution.""" resolved_address: str | None = Field(None, description='The resolved Ethereum address corresponding to the ENS name, or null if not found.')
class EnsAddressData(BaseModel): '''A structured representation of an ENS name resolution.''' pass
1
1
0
0
0
0
0
0.2
1
0
0
0
0
0
0
82
7
1
5
2
4
1
2
2
1
0
5
0
0
324,064
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.InstructionsData
from pydantic import BaseModel, ConfigDict, Field class InstructionsData(BaseModel): """A structured representation of the server's operational instructions.""" version: str = Field(description='The version of the Blockscout MCP server.') error_handling_rules: str = Field(description='Rules for handling ne...
class InstructionsData(BaseModel): '''A structured representation of the server's operational instructions.''' pass
1
1
0
0
0
0
0
0.08
1
0
0
0
0
0
0
82
14
1
12
10
11
1
10
10
9
0
5
0
0
324,065
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.LatestBlockData
from pydantic import BaseModel, ConfigDict, Field class LatestBlockData(BaseModel): """Represents the essential data for the latest block.""" block_number: int = Field(description='The block number (height) in the blockchain') timestamp: str = Field(description='The timestamp when the block was mined (ISO ...
class LatestBlockData(BaseModel): '''Represents the essential data for the latest block.''' pass
1
1
0
0
0
0
0
0.33
1
0
0
0
0
0
0
82
5
1
3
3
2
1
3
3
2
0
5
0
0
324,066
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.LogItemBase
from pydantic import BaseModel, ConfigDict, Field from typing import Any, Generic, TypeVar class LogItemBase(BaseModel): """Common fields for log items from Blockscout.""" model_config = ConfigDict(extra='allow') block_number: int | None = Field(None, description='The block where the event was emitted.') ...
class LogItemBase(BaseModel): '''Common fields for log items from Blockscout.''' pass
1
1
0
0
0
0
0
0.2
1
0
0
2
0
0
0
82
13
2
10
7
9
2
7
7
6
0
5
0
0
324,067
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.NextCallInfo
from pydantic import BaseModel, ConfigDict, Field from typing import Any, Generic, TypeVar class NextCallInfo(BaseModel): """A structured representation of the tool call required to get the next page.""" tool_name: str = Field(description='The name of the tool to call for the next page.') params: dict[str,...
class NextCallInfo(BaseModel): '''A structured representation of the tool call required to get the next page.''' pass
1
1
0
0
0
0
0
0.2
1
0
0
0
0
0
0
82
7
1
5
3
4
1
3
3
2
0
5
0
0
324,068
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.NftCollectionHolding
from pydantic import BaseModel, ConfigDict, Field class NftCollectionHolding(BaseModel): """Represents an address's holding in a single NFT collection.""" collection: NftCollectionInfo = Field(description='The details of the NFT collection.') amount: str = Field(description='The number of tokens from this ...
class NftCollectionHolding(BaseModel): '''Represents an address's holding in a single NFT collection.''' pass
1
1
0
0
0
0
0
0.17
1
0
0
0
0
0
0
82
8
1
6
4
5
1
4
4
3
0
5
0
0
324,069
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.NftCollectionInfo
from pydantic import BaseModel, ConfigDict, Field class NftCollectionInfo(BaseModel): """Represents the metadata for an NFT collection.""" type: str = Field(description='The token standard of the collection.') address: str = Field(description='The smart contract address of the NFT collection.') name: s...
class NftCollectionInfo(BaseModel): '''Represents the metadata for an NFT collection.''' pass
1
1
0
0
0
0
0
0.14
1
0
0
0
0
0
0
82
9
1
7
7
6
1
7
7
6
0
5
0
0
324,070
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.NftTokenInstance
from pydantic import BaseModel, ConfigDict, Field class NftTokenInstance(BaseModel): """Represents a single NFT instance with its metadata.""" id: str = Field(description='The unique identifier of the NFT token instance.') name: str | None = Field(None, description='The name of the NFT, extracted from its ...
class NftTokenInstance(BaseModel): '''Represents a single NFT instance with its metadata.''' pass
1
1
0
0
0
0
0
0.15
1
0
0
0
0
0
0
82
15
1
13
6
12
2
7
6
6
0
5
0
0
324,071
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.PaginationInfo
from pydantic import BaseModel, ConfigDict, Field class PaginationInfo(BaseModel): """Contains the structured information needed to retrieve the next page of results.""" next_call: NextCallInfo = Field(description='The structured tool call required to fetch the subsequent page.')
class PaginationInfo(BaseModel): '''Contains the structured information needed to retrieve the next page of results.''' pass
1
1
0
0
0
0
0
0.5
1
0
0
0
0
0
0
82
4
1
2
2
1
1
2
2
1
0
5
0
0
324,072
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.TokenHoldingData
from pydantic import BaseModel, ConfigDict, Field class TokenHoldingData(BaseModel): """Represents a single token holding with its associated metadata.""" address: str = Field(description='The contract address of the token.') name: str = Field(description="The full name of the token (e.g., 'USD Coin').") ...
class TokenHoldingData(BaseModel): '''Represents a single token holding with its associated metadata.''' pass
1
1
0
0
0
0
0
0.1
1
0
0
0
0
0
0
82
12
1
10
10
9
1
10
10
9
0
5
0
0
324,073
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.TokenSearchResult
from pydantic import BaseModel, ConfigDict, Field class TokenSearchResult(BaseModel): """Represents a single token found by a search query.""" address: str = Field(description='The contract address of the token.') name: str = Field(description="The full name of the token (e.g., 'USD Coin').") symbol: s...
class TokenSearchResult(BaseModel): '''Represents a single token found by a search query.''' pass
1
1
0
0
0
0
0
0.1
1
0
0
0
0
0
0
82
12
1
10
10
9
1
10
10
9
0
5
0
0
324,074
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.TokenTransfer
from typing import Any, Generic, TypeVar from pydantic import BaseModel, ConfigDict, Field class TokenTransfer(BaseModel): """Represents a single token transfer within a transaction.""" model_config = ConfigDict(extra='allow') from_address: str | None = Field(alias='from', description='Sender address of th...
class TokenTransfer(BaseModel): '''Represents a single token transfer within a transaction.''' pass
1
1
0
0
0
0
0
0.33
1
0
0
0
0
0
0
82
9
2
6
6
5
2
6
6
5
0
5
0
0
324,075
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.ToolResponse
from pydantic import BaseModel, ConfigDict, Field from typing import Any, Generic, TypeVar class ToolResponse(BaseModel, Generic[T]): """A standardized, structured response for all MCP tools, generic over the data payload type.""" data: T = Field(description="The main data payload of the tool's response.") ...
class ToolResponse(BaseModel, Generic[T]): '''A standardized, structured response for all MCP tools, generic over the data payload type.''' pass
1
1
0
0
0
0
0
0.05
2
0
0
0
0
0
0
84
26
5
20
6
19
1
6
6
5
0
5
0
0
324,076
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.TransactionInfoData
from pydantic import BaseModel, ConfigDict, Field class TransactionInfoData(BaseModel): """Structured representation of get_transaction_info data.""" model_config = ConfigDict(extra='allow') from_address: str | None = Field(default=None, alias='from', description='Sender of the transaction if available.') ...
class TransactionInfoData(BaseModel): '''Structured representation of get_transaction_info data.''' pass
1
1
0
0
0
0
0
0.1
1
0
0
0
0
0
0
82
26
4
21
8
20
2
8
8
7
0
5
0
0
324,077
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.TransactionLogItem
from pydantic import BaseModel, ConfigDict, Field class TransactionLogItem(LogItemBase): """Represents a single log item with its originating contract address.""" address: str | None = Field(None, description='The contract address that emitted the log.')
class TransactionLogItem(LogItemBase): '''Represents a single log item with its originating contract address.''' pass
1
1
0
0
0
0
0
0.2
1
0
0
0
0
0
0
82
7
1
5
2
4
1
2
2
1
0
6
0
0
324,078
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/models.py
blockscout_mcp_server.models.TransactionSummaryData
from pydantic import BaseModel, ConfigDict, Field class TransactionSummaryData(BaseModel): """A structured representation of a transaction summary.""" summary: list[dict] | None = Field(None, description='List of summary objects for generating human-readable transaction descriptions, or null if no summary data...
class TransactionSummaryData(BaseModel): '''A structured representation of a transaction summary.''' pass
1
1
0
0
0
0
0
0.13
1
0
0
0
0
0
0
82
10
1
8
2
7
1
2
2
1
0
5
0
0
324,079
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/tools/common.py
blockscout_mcp_server.tools.common.ChainNotFoundError
class ChainNotFoundError(ValueError): """Exception raised when a chain ID cannot be found or resolved to a Blockscout URL.""" pass
class ChainNotFoundError(ValueError): '''Exception raised when a chain ID cannot be found or resolved to a Blockscout URL.''' pass
1
1
0
0
0
0
0
0.5
1
0
0
0
0
0
0
11
4
1
2
1
1
1
2
1
1
0
4
0
0
324,080
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/tools/common.py
blockscout_mcp_server.tools.common.InvalidCursorError
class InvalidCursorError(ValueError): """Raised when a pagination cursor is malformed or invalid.""" pass
class InvalidCursorError(ValueError): '''Raised when a pagination cursor is malformed or invalid.''' pass
1
1
0
0
0
0
0
0.5
1
0
0
0
0
0
0
11
4
1
2
1
1
1
2
1
1
0
4
0
0
324,081
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/web3_pool.py
blockscout_mcp_server.web3_pool.AsyncHTTPProviderBlockscout
import aiohttp from itertools import count from web3.providers.rpc import AsyncHTTPProvider from typing import Any from blockscout_mcp_server.config import config class AsyncHTTPProviderBlockscout(AsyncHTTPProvider): """Custom provider with Blockscout-specific adaptations. ``web3.py``'s stock provider doesn't...
class AsyncHTTPProviderBlockscout(AsyncHTTPProvider): '''Custom provider with Blockscout-specific adaptations. ``web3.py``'s stock provider doesn't cooperate well with Blockscout's JSON-RPC implementation. Blockscout rejects requests with ``id=0`` and expects ``params`` to be JSON arrays. The standard ...
5
2
13
1
9
3
2
0.61
1
9
0
0
4
3
4
4
69
10
38
13
33
23
25
10
20
5
1
2
8
324,082
blockscout/mcp-server
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/blockscout_mcp-server/blockscout_mcp_server/web3_pool.py
blockscout_mcp_server.web3_pool.Web3Pool
from blockscout_mcp_server.config import config from web3 import AsyncWeb3 from blockscout_mcp_server.tools.common import get_blockscout_base_url import aiohttp class Web3Pool: """Manage pooled ``AsyncWeb3`` instances with shared sessions. Each unique combination of chain and headers gets its own ``AsyncWeb3`...
class Web3Pool: '''Manage pooled ``AsyncWeb3`` instances with shared sessions. Each unique combination of chain and headers gets its own ``AsyncWeb3`` instance backed by a shared ``aiohttp.ClientSession``. Reusing these connections avoids the overhead of establishing new TCP handshakes for every co...
4
1
17
1
15
0
3
0.15
0
7
1
0
3
2
3
3
61
8
46
16
42
7
35
16
31
6
0
3
10
324,083
lnagel/hass-komfovent
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/lnagel_hass-komfovent/custom_components/komfovent/binary_sensor.py
custom_components.komfovent.binary_sensor.KomfoventBinarySensor
from homeassistant.components.binary_sensor import BinarySensorDeviceClass, BinarySensorEntity, BinarySensorEntityDescription from homeassistant.helpers.update_coordinator import CoordinatorEntity from .const import DOMAIN class KomfoventBinarySensor(CoordinatorEntity, BinarySensorEntity): """Base class for Komfov...
class KomfoventBinarySensor(CoordinatorEntity, BinarySensorEntity): '''Base class for Komfovent binary sensors.''' def __init__(self, coordinator: KomfoventCoordinator, register_id: int, entity_description: BinarySensorEntityDescription) -> None: '''Initialize the binary sensor.''' pass @p...
4
3
14
0
13
1
2
0.11
2
4
1
1
2
4
2
2
34
3
28
15
19
3
15
9
12
3
1
1
4
324,084
lnagel/hass-komfovent
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/lnagel_hass-komfovent/custom_components/komfovent/binary_sensor.py
custom_components.komfovent.binary_sensor.KomfoventStatusBinarySensor
from homeassistant.components.binary_sensor import BinarySensorDeviceClass, BinarySensorEntity, BinarySensorEntityDescription class KomfoventStatusBinarySensor(KomfoventBinarySensor): """Binary sensor for status register bitmask values.""" def __init__(self, coordinator: KomfoventCoordinator, register_id: int...
class KomfoventStatusBinarySensor(KomfoventBinarySensor): '''Binary sensor for status register bitmask values.''' def __init__(self, coordinator: KomfoventCoordinator, register_id: int, bitmask: int, entity_description: BinarySensorEntityDescription) -> None: '''Initialize the binary sensor.''' ...
4
3
9
0
8
1
2
0.17
1
4
1
0
2
1
2
4
23
2
18
12
8
3
11
5
8
3
2
1
4
324,085
lnagel/hass-komfovent
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/lnagel_hass-komfovent/custom_components/komfovent/button.py
custom_components.komfovent.button.KomfoventButtonEntity
from .const import DOMAIN from homeassistant.helpers.update_coordinator import CoordinatorEntity from homeassistant.components.button import ButtonEntity, ButtonEntityDescription class KomfoventButtonEntity(CoordinatorEntity, ButtonEntity): """Base class for Komfovent button entities.""" _attr_has_entity_name ...
class KomfoventButtonEntity(CoordinatorEntity, ButtonEntity): '''Base class for Komfovent button entities.''' def __init__(self, coordinator: KomfoventCoordinator, entity_description: ButtonEntityDescription) -> None: '''Initialize the button.''' pass
2
2
17
0
16
1
1
0.11
2
2
1
2
1
3
1
1
22
2
18
10
12
2
7
6
5
1
1
0
1
324,086
lnagel/hass-komfovent
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/lnagel_hass-komfovent/custom_components/komfovent/button.py
custom_components.komfovent.button.KomfoventCleanFiltersButton
from . import services class KomfoventCleanFiltersButton(KomfoventButtonEntity): """Button to calibrate clean filters on Komfovent device.""" async def async_press(self) -> None: """Handle the button press.""" await services.clean_filters_calibration(self.coordinator)
class KomfoventCleanFiltersButton(KomfoventButtonEntity): '''Button to calibrate clean filters on Komfovent device.''' async def async_press(self) -> None: '''Handle the button press.''' pass
2
2
3
0
2
1
1
0.67
1
0
0
0
1
0
1
2
6
1
3
2
1
2
3
2
1
1
2
0
1
324,087
lnagel/hass-komfovent
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/lnagel_hass-komfovent/custom_components/komfovent/button.py
custom_components.komfovent.button.KomfoventSetTimeButton
from . import services class KomfoventSetTimeButton(KomfoventButtonEntity): """Button to set system time on Komfovent device.""" async def async_press(self) -> None: """Handle the button press.""" await services.set_system_time(self.coordinator)
class KomfoventSetTimeButton(KomfoventButtonEntity): '''Button to set system time on Komfovent device.''' async def async_press(self) -> None: '''Handle the button press.''' pass
2
2
3
0
2
1
1
0.67
1
0
0
0
1
0
1
2
6
1
3
2
1
2
3
2
1
1
2
0
1
324,088
lnagel/hass-komfovent
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/lnagel_hass-komfovent/custom_components/komfovent/climate.py
custom_components.komfovent.climate.KomfoventClimate
from .const import DOMAIN, OperationMode, TemperatureControl from homeassistant.helpers.update_coordinator import CoordinatorEntity from homeassistant.components.climate import ClimateEntity, ClimateEntityFeature, HVACMode from homeassistant.const import ATTR_TEMPERATURE, UnitOfTemperature from typing import TYPE_CHECK...
class KomfoventClimate(CoordinatorEntity, ClimateEntity): '''Representation of a Komfovent climate device.''' def __init__(self, coordinator: KomfoventCoordinator) -> None: '''Initialize the climate device.''' pass @property def current_temperature(self) -> float | None: '''Ret...
13
9
14
1
11
1
3
0.11
2
12
3
0
8
4
8
8
137
20
105
36
92
12
77
29
68
5
1
2
24
324,089
lnagel/hass-komfovent
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/lnagel_hass-komfovent/custom_components/komfovent/config_flow.py
custom_components.komfovent.config_flow.KomfoventConfigFlow
from homeassistant.data_entry_flow import FlowResult from homeassistant.core import callback from .const import DEFAULT_NAME, DEFAULT_PORT, DOMAIN, OPT_STEP_CO2, OPT_STEP_FLOW, OPT_STEP_HUMIDITY, OPT_STEP_TEMPERATURE, OPT_STEP_TIMER, OPT_STEP_VOC from homeassistant.const import CONF_HOST, CONF_NAME, CONF_PORT from home...
class KomfoventConfigFlow(ConfigFlow, domain=DOMAIN): '''Handle a config flow for Komfovent.''' async def async_step_user(self, user_input: dict[str, Any] | None=None) -> FlowResult: '''Handle the initial step.''' pass async def async_step_reconfigure(self, user_input: dict[str, Any] | None=None)...
6
4
13
1
10
1
2
0.11
2
4
1
0
2
0
3
3
47
8
35
13
25
4
15
8
11
2
1
1
5
324,090
lnagel/hass-komfovent
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/lnagel_hass-komfovent/custom_components/komfovent/config_flow.py
custom_components.komfovent.config_flow.OptionsFlowHandler
from homeassistant.data_entry_flow import FlowResult from homeassistant.config_entries import ConfigEntry, ConfigFlow, OptionsFlow from typing import Any class OptionsFlowHandler(OptionsFlow): """Options flow handler for Komfovent.""" async def async_step_init(self, user_input: dict[str, Any] | None=None) -> ...
class OptionsFlowHandler(OptionsFlow): '''Options flow handler for Komfovent.''' async def async_step_init(self, user_input: dict[str, Any] | None=None) -> FlowResult: '''Manage the options.''' pass
2
2
13
1
11
1
2
0.17
1
3
0
0
1
0
1
1
16
2
12
4
8
2
5
2
3
2
1
1
2
324,091
lnagel/hass-komfovent
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/lnagel_hass-komfovent/custom_components/komfovent/const.py
custom_components.komfovent.const.AirQualitySensorType
from enum import IntEnum class AirQualitySensorType(IntEnum): """Air quality sensor types.""" NOT_INSTALLED = 0 CO2 = 1 VOC = 2 HUMIDITY = 3
class AirQualitySensorType(IntEnum): '''Air quality sensor types.''' pass
1
1
0
0
0
0
0
0.2
1
0
0
0
0
0
0
55
7
1
5
5
4
1
5
5
4
0
3
0
0
324,092
lnagel/hass-komfovent
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/lnagel_hass-komfovent/custom_components/komfovent/const.py
custom_components.komfovent.const.AutoModeControl
from enum import IntEnum class AutoModeControl(IntEnum): """Auto mode control types.""" SCHEDULING = 0 AIR_QUALITY = 1
class AutoModeControl(IntEnum): '''Auto mode control types.''' pass
1
1
0
0
0
0
0
0.33
1
0
0
0
0
0
0
55
5
1
3
3
2
1
3
3
2
0
3
0
0
324,093
lnagel/hass-komfovent
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/lnagel_hass-komfovent/custom_components/komfovent/const.py
custom_components.komfovent.const.CoilType
from enum import IntEnum class CoilType(IntEnum): """Coil types.""" HOT_WATER = 0 COLD_WATER = 1 COMBI = 2
class CoilType(IntEnum): '''Coil types.''' pass
1
1
0
0
0
0
0
0.25
1
0
0
0
0
0
0
55
6
1
4
4
3
1
4
4
3
0
3
0
0
324,094
lnagel/hass-komfovent
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/lnagel_hass-komfovent/custom_components/komfovent/const.py
custom_components.komfovent.const.ConnectedPanels
from enum import IntEnum class ConnectedPanels(IntEnum): """Connected control panels.""" NONE = 0 PANEL1 = 1 PANEL2 = 2 BOTH = 3
class ConnectedPanels(IntEnum): '''Connected control panels.''' pass
1
1
0
0
0
0
0
0.2
1
0
0
0
0
0
0
55
7
1
5
5
4
1
5
5
4
0
3
0
0
324,095
lnagel/hass-komfovent
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/lnagel_hass-komfovent/custom_components/komfovent/const.py
custom_components.komfovent.const.ControlStage
from enum import IntEnum class ControlStage(IntEnum): """Control stage options.""" NONE = 0 EXTERNAL_COIL = 1 ELECTRIC_HEATER = 2 EXTERNAL_DX_UNIT = 3
class ControlStage(IntEnum): '''Control stage options.''' pass
1
1
0
0
0
0
0
0.2
1
0
0
0
0
0
0
55
7
1
5
5
4
1
5
5
4
0
3
0
0
324,096
lnagel/hass-komfovent
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/lnagel_hass-komfovent/custom_components/komfovent/const.py
custom_components.komfovent.const.Controller
from enum import IntEnum class Controller(IntEnum): """Controllers.""" C6 = 0 C6M = 1 C8 = 2 NA = 15
class Controller(IntEnum): '''Controllers.''' pass
1
1
0
0
0
0
0
0.2
1
0
0
0
0
0
0
55
7
1
5
5
4
1
5
5
4
0
3
0
0
324,097
lnagel/hass-komfovent
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/lnagel_hass-komfovent/custom_components/komfovent/const.py
custom_components.komfovent.const.FlowControl
from enum import IntEnum class FlowControl(IntEnum): """Flow control types.""" CONSTANT = 0 VARIABLE = 1 DIRECT = 2 OFF = 3
class FlowControl(IntEnum): '''Flow control types.''' pass
1
1
0
0
0
0
0
0.2
1
0
0
0
0
0
0
55
7
1
5
5
4
1
5
5
4
0
3
0
0
324,098
lnagel/hass-komfovent
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/lnagel_hass-komfovent/custom_components/komfovent/const.py
custom_components.komfovent.const.FlowUnit
from enum import IntEnum class FlowUnit(IntEnum): """Flow measurement units.""" M3H = 0 LS = 1
class FlowUnit(IntEnum): '''Flow measurement units.''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
55
5
1
3
3
2
3
3
3
2
0
3
0
0
324,099
lnagel/hass-komfovent
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/lnagel_hass-komfovent/custom_components/komfovent/const.py
custom_components.komfovent.const.HeatExchangerType
from enum import IntEnum class HeatExchangerType(IntEnum): """Heat exchanger types.""" PLATE = 0 ROTARY = 1
class HeatExchangerType(IntEnum): '''Heat exchanger types.''' pass
1
1
0
0
0
0
0
0.33
1
0
0
0
0
0
0
55
5
1
3
3
2
1
3
3
2
0
3
0
0