Skip to content

Commit d16a308

Browse files
committed
mypy: remove redundant ignore type annotations
1 parent 090c1ba commit d16a308

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

schema_salad/ref_resolver.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,16 @@ def __init__(self, normalize=six.text_type): # type: (Callable) -> None
7171
self.normalize = normalize
7272

7373
def __getitem__(self, key): # type: (Any) -> Any
74-
return super(NormDict, self).__getitem__(self.normalize(key)) # type: ignore
74+
return super(NormDict, self).__getitem__(self.normalize(key))
7575

7676
def __setitem__(self, key, value): # type: (Any, Any) -> Any
7777
return super(NormDict, self).__setitem__(self.normalize(key), value)
7878

7979
def __delitem__(self, key): # type: (Any) -> Any
80-
return super(NormDict, self).__delitem__(self.normalize(key)) # type: ignore
80+
return super(NormDict, self).__delitem__(self.normalize(key))
8181

8282
def __contains__(self, key): # type: (Any) -> Any
83-
return super(NormDict, self).__contains__(self.normalize(key)) # type: ignore
83+
return super(NormDict, self).__contains__(self.normalize(key))
8484

8585

8686
def merge_properties(a, b): # type: (List[Any], List[Any]) -> Dict[Any, Any]
@@ -814,7 +814,7 @@ def resolve_all(self,
814814
document.lc.data[
815815
j - 1] = document.lc.data[j - llen]
816816
for item in l:
817-
document.insert(i, item) # type: ignore
817+
document.insert(i, item)
818818
document.lc.data[i] = lc
819819
i += 1
820820
else:
@@ -852,7 +852,7 @@ def fetch(self, url, inject_ids=True): # type: (Text, bool) -> Any
852852
else:
853853
textIO = StringIO(text)
854854
textIO.name = url # type: ignore
855-
result = yaml.round_trip_load(textIO) # type: ignore
855+
result = yaml.round_trip_load(textIO)
856856
add_lc_filename(result, url)
857857
except yaml.parser.ParserError as e:
858858
raise validate.ValidationException("Syntax error %s" % (e))
@@ -1008,7 +1008,7 @@ def _copy_dict_without_key(from_dict, filtered_key):
10081008
# type: (D, Any) -> D
10091009
new_dict = copy.copy(from_dict)
10101010
if filtered_key in new_dict:
1011-
del new_dict[filtered_key] # type: ignore
1011+
del new_dict[filtered_key]
10121012
if isinstance(from_dict, CommentedMap):
10131013
new_dict.lc.data = copy.copy(from_dict.lc.data)
10141014
new_dict.lc.filename = from_dict.lc.filename

schema_salad/schema.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def get_metaschema():
176176
loader.cache["https://w3id.org/cwl/salad"] = rs.read()
177177
rs.close()
178178

179-
j = yaml.round_trip_load(loader.cache["https://w3id.org/cwl/salad"]) # type: ignore
179+
j = yaml.round_trip_load(loader.cache["https://w3id.org/cwl/salad"])
180180
add_lc_filename(j, "metaschema.yml")
181181
j, _ = loader.resolve_all(j, "https://w3id.org/cwl/salad#")
182182

@@ -429,7 +429,7 @@ def make_valid_avro(items, # type: Avro
429429
if isinstance(items, list):
430430
ret = []
431431
for i in items:
432-
ret.append(make_valid_avro(i, alltypes, found, union=union))
432+
ret.append(make_valid_avro(i, alltypes, found, union=union)) # type: ignore
433433
return ret
434434
if union and isinstance(items, (str, six.text_type)):
435435
if items in alltypes and avro_name(items) not in found:

schema_salad/validate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def validate_ex(expected_schema, # type: Schema
213213
continue
214214
elif isinstance(datum, dict) and not isinstance(s, avro.schema.RecordSchema):
215215
continue
216-
elif isinstance(datum, (bool, six.integer_types, float, six.string_types)) and isinstance(s, (avro.schema.ArraySchema, avro.schema.RecordSchema)): # type: ignore
216+
elif isinstance(datum, (bool, six.integer_types, float, six.string_types)) and isinstance(s, (avro.schema.ArraySchema, avro.schema.RecordSchema)):
217217
continue
218218
elif datum is not None and s.type == "null":
219219
continue

0 commit comments

Comments
 (0)