Skip to content

Commit

Permalink
Core & Internals: ignore type checking for return vals
Browse files Browse the repository at this point in the history
  • Loading branch information
erlingstaff committed Mar 11, 2024
1 parent 2eea44f commit 6791dff
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/rucio/core/rule.py
Expand Up @@ -2027,7 +2027,7 @@ def get_updated_dids(total_workers: int, worker_number: int, limit: int = 100, b
else:
return filtered_dids
else:
return [did for did in session.execute(stmt.order_by(models.UpdatedDID.created_at)).all() if (did.scope, did.name) not in blocked_dids]
return [did for did in session.execute(stmt.order_by(models.UpdatedDID.created_at)).all() if (did.scope, did.name) not in blocked_dids] # type: ignore


@read_session
Expand Down Expand Up @@ -2055,7 +2055,7 @@ def get_rules_beyond_eol(date_check: datetime, worker_number: int, total_workers

stmt = filter_thread_work(session=session, query=stmt, total_threads=total_workers, thread_id=worker_number, hash_variable='name')
result = session.execute(stmt).all()
return [rule for rule in result]
return [rule for rule in result] # type: ignore


@read_session
Expand Down Expand Up @@ -2095,9 +2095,9 @@ def get_expired_rules(total_workers: int, worker_number: int, limit: int = 100,
blocked_rules=blocked_rules,
session=session)
else:
return filtered_rules
return filtered_rules # type: ignore
else:
return [rule for rule in session.execute(stmt).all() if rule._mapping['id'] not in blocked_rules]
return [rule for rule in session.execute(stmt).all() if rule._mapping['id'] not in blocked_rules] # type: ignore


@read_session
Expand Down Expand Up @@ -2135,9 +2135,9 @@ def get_injected_rules(total_workers: int, worker_number: int, limit: int = 100,
blocked_rules=blocked_rules,
session=session)
else:
return filtered_rules
return filtered_rules # type: ignore
else:
return [rule for rule in session.execute(stmt).all() if rule._mapping['id'] not in blocked_rules]
return [rule for rule in session.execute(stmt).all() if rule._mapping['id'] not in blocked_rules] # type: ignore


@read_session
Expand Down Expand Up @@ -2179,9 +2179,9 @@ def get_stuck_rules(total_workers: int, worker_number: int, delta: int = 600, li
blocked_rules=blocked_rules,
session=session)
else:
return filtered_rules
return filtered_rules # type: ignore
else:
return [rule for rule in session.execute(stmt).all() if rule._mapping['id'] not in blocked_rules]
return [rule for rule in session.execute(stmt).all() if rule._mapping['id'] not in blocked_rules] # type: ignore


@transactional_session
Expand Down

0 comments on commit 6791dff

Please sign in to comment.