Skip to content

Commit

Permalink
chore: Fix PLW2901
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Sep 15, 2024
1 parent a9c3e12 commit 048e668
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions ocdsindex/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ def copy(host, source, destination):
with connect(host) as es:
body = []

for result in es.cat.indices(format="json"):
index = result["index"]
for index_result in es.cat.indices(format="json"):
index = index_result["index"]
result = es.search(index=index, size=10000, query={"term": {"base_url": source}})
for hit in result["hits"]["hits"]:
document = hit["_source"]
Expand All @@ -147,9 +147,9 @@ def expire(host, exclude_file):
base_urls = [line.strip() for line in exclude_file] if exclude_file else []

with connect(host) as es:
for result in es.cat.indices(format="json"):
for index_result in es.cat.indices(format="json"):
es.delete_by_query(
index=result["index"],
index=index_result["index"],
query={
"bool": {
"must": {
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ target-version = "py39"
select = ["ALL"]
ignore = [
"ANN", "C901", "COM812", "D203", "D212", "D415", "EM", "PERF203", "PLR091", "Q000",
"PLR2004", "PLW2901", "D100", "D103", "D104", "D205",
"PLR2004", "D100", "D103", "D104", "D205",
"PTH",
]

Expand Down

0 comments on commit 048e668

Please sign in to comment.