Skip to content

Commit c624445

Browse files
h-jooLIT team
authored andcommitted
Suppressions for pyrefly
PiperOrigin-RevId: 951112155
1 parent bcae735 commit c624445

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎lit_nlp/app.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def _get_preds(self,
305305
t_class = getattr(types, t_name, None)
306306
if not issubclass(t_class, types.LitType): # pyrefly: ignore[bad-argument-type]
307307
raise TypeError(f"Class '{t_name}' is not a valid LitType.")
308-
requested_fields.extend(utils.find_spec_keys(output_spec, t_class))
308+
requested_fields.extend(utils.find_spec_keys(output_spec, t_class)) # pyrefly: ignore[missing-attribute]
309309
ret_keys = set(requested_fields) # de-dupe # pyrefly: ignore[bad-argument-type]
310310

311311
# Return selected keys.

‎lit_nlp/components/index.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ def __init__(
6363
# Indicator whether to build new indices. If False, only load existing ones.
6464
self._initialize_new_indices = initialize_new_indices
6565
# Ensure directory to save indices exists.
66-
if not os.path.isdir(data_dir):
67-
os.mkdir(data_dir)
66+
if not os.path.isdir(data_dir): # pyrefly: ignore[bad-argument-type]
67+
os.mkdir(data_dir) # pyrefly: ignore[bad-argument-type]
6868
self._data_dir = data_dir
6969
self._models = models
7070

@@ -93,12 +93,12 @@ def _get_lookup_key(self, model_name, dataset_name):
9393

9494
def _get_index_path(self, index_key):
9595
"""Get the file path for an index."""
96-
file_path = os.path.join(self._data_dir, f"{index_key}.ann")
96+
file_path = os.path.join(self._data_dir, f"{index_key}.ann") # pyrefly: ignore[no-matching-overload]
9797
return file_path
9898

9999
def _get_lookup_path(self, lookup_key):
100100
"""Get the file path for the lookup index."""
101-
file_path = os.path.join(self._data_dir, lookup_key + ".pkl")
101+
file_path = os.path.join(self._data_dir, lookup_key + ".pkl") # pyrefly: ignore[no-matching-overload]
102102
return file_path
103103

104104
def _create_empty_indices(self, model_name, dataset_name):

‎lit_nlp/components/thresholder.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def run(
238238
list(inputs), model, dataset, model_outputs, metrics_config))
239239

240240
# Get and store the metrics for each facet of the dataset for this margin.
241-
if not (facets := config.facets):
241+
if not (facets := config.facets): # pyrefly: ignore[missing-attribute]
242242
continue
243243

244244
for facet_key, facet_dict in facets.items():

0 commit comments

Comments
 (0)