forked from leanEthereum/leanSpec
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvulture_whitelist.py
More file actions
171 lines (153 loc) · 4.93 KB
/
Copy pathvulture_whitelist.py
File metadata and controls
171 lines (153 loc) · 4.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# Whitelist for vulture dead-code detection.
#
# Each line names a symbol whose use is real but invisible to static analysis:
# framework dispatch, serialization, reflection, or an interpreter protocol.
# Vulture parses every reference here as a use, so the symbol stops being
# reported. A bare name covers a function or variable; the "_." prefix covers a
# method or an attribute.
#
# This file is data for vulture, not executable code, so it is excluded from
# ruff and ty.
#
# Keep it tight. Add a symbol only after confirming its use is genuine but
# unseen by vulture. Genuinely dead code must stay out of this file so vulture
# keeps reporting it. Prefer fixing the dead code over silencing it here.
# Magic methods invoked by the interpreter.
# Flagged only because they are defined as overloaded functions or as an
# attribute rather than a plain method, which the built-in dunder filter misses.
__pow__
__repr__
__le__
_.__len__
# pytest hooks, discovered by name from the plugin and conftest modules.
pytest_addoption
pytest_ignore_collect
pytest_configure
pytest_collection_modifyitems
pytest_sessionstart
pytest_sessionfinish
pytest_runtest_makereport
pytest_generate_tests
# pytest autouse fixtures and module markers, applied implicitly.
reset_xmss_signing_state
_reset_registry
_reset_metrics
_reset_observer
pytestmark
# Pydantic validators, invoked by the model during validation.
_.check_lengths
_._coerce_and_validate
_._accept_hex_string
_._validate_byte_list_data
_._validate_decomposition
_._check_index_matches_position
_._require_index_matches_position
_.validate_state_length
_.validate_target
_.validate_rejection_is_declared
_.validate_signatures_are_out_of_scope
_._yaml_int_to_hex
_._check_list_lengths
_._reject_oversized_validator_set
_._check_index_matches_position
_._require_index_matches_position
# Pydantic serializers, invoked by the model during serialization.
_.serialize_value
_.serialize_block
_._serialize_data
_._serialize_as_hex
# Signature parameters mandated by external protocols we cannot rename.
# The pydantic core-schema hook, the pytest session-finish hook, and the
# prometheus metric stub interface.
source_type
exitstatus
amount
# aioquic server-side TLS attribute, read by aioquic during the handshake to
# decide whether to request the client certificate.
# aioquic defaults to not requesting it, so we set it by wrapping the lazy
# connection initializer.
# aioquic reads it internally, so the assignment looks unused here.
_._request_client_certificate
# logging.Formatter.format override, invoked by the logging framework.
_.format
# httpx transport hook, invoked by the httpx client through its test doubles.
_.handle_async_request
# unittest.mock attributes, read by the mock library.
_.return_value
_.side_effect
# sqlite3 connection attribute, read by the sqlite3 driver.
_.row_factory
# Enum member resolved from a command-line string through the enum constructor.
# The mode is selected by value, so the member name has no direct reference.
REAL
# Dataclass field on a peer-subscription event.
# Set from the subscribe flag at construction and compared through dataclass
# equality in tests, neither of which vulture counts as a read.
subscribed
# Validator manifest fields, mirroring an external YAML schema.
# Deserialized and validated by pydantic, not all read back by attribute.
attestation_public_key_hex
proposal_public_key_hex
key_scheme
hash_function
log_num_active_epochs
num_active_epochs
# Field names on test-vector and fixture models.
# Populated from constructor keywords and consumed by serialization or
# comparison, never read by attribute in Python.
description
comment
expected_status_code
expected_content_type
expected_body
to_peer
signature_valid
protobuf_encoded
compressed_length
framed_length
seconds_per_slot
intervals_per_slot
milliseconds_per_interval
state_bytes
step_type
latest_justified_slot
latest_justified_root
latest_finalized_slot
latest_finalized_root
config_genesis_time
latest_block_header_slot
latest_block_header_proposer_index
latest_block_header_parent_root
latest_block_header_state_root
latest_block_header_body_root
historical_block_hashes_count
justifications_roots_count
justifications_validators_count
safe_target_root
safe_target_root_label
attestation_signature_target_slots
latest_new_aggregated_target_slots
latest_known_aggregated_target_slots
participant_sets
block_weights
known_aggregated_payloads
is_justifiable
combined_attesters
reaggregated_proof
# SSZ type parameters and overrides read through the SSZ base rather than by name.
# The base decides mutability and byte width from these, so no call site names them.
MUTABLE
_.fixed_size
# SSZ container and model field names declared inside unit tests.
# Serialized by the SSZ codec or set through pydantic, never read by attribute.
A
B
C
y
first_name
previous
slot_number
_.slot_number
# Attribute assignment in slotted-class tests that proves new attributes are
# rejected; the assignment is the action under test, never read back.
_.extra_field