Enable ruff's "comprehensions" rules
This commit is contained in:
parent
02777265b0
commit
de0db9ac5a
@ -174,7 +174,7 @@ class MembershipWorks:
|
||||
# get list of member ID matching the search
|
||||
# dedup with set() to work around people with alt uids
|
||||
# TODO: figure out why people have alt uids
|
||||
return set(user["uid"] for user in r.json()["usr"])
|
||||
return {user["uid"] for user in r.json()["usr"]}
|
||||
|
||||
# TODO: has issues with aliasing header names:
|
||||
# ex: "Personal Studio Space" Label vs Membership Addon/Field
|
||||
|
@ -80,10 +80,8 @@ def scrape_transactions(membershipworks: MembershipWorks):
|
||||
# this is terrible, but as long as the dates are the same, should be fiiiine
|
||||
transactions = [{**j, **v} for j, v in zip(transactions_csv, transactions_json)]
|
||||
assert all(
|
||||
[
|
||||
t["Account ID"] == t.get("uid", "") and t["Payment ID"] == t.get("sid", "")
|
||||
for t in transactions
|
||||
]
|
||||
)
|
||||
|
||||
for csv_transaction in transactions:
|
||||
|
@ -43,7 +43,7 @@ admin_email = "cmsmanage.django_q2_admin_email_reporter:AdminEmailReporter"
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 88
|
||||
select = ["E4", "E7", "E9", "F", "I"]
|
||||
select = ["E4", "E7", "E9", "F", "I", "C4"]
|
||||
|
||||
[tool.ruff.lint.isort]
|
||||
known-first-party = [
|
||||
|
Loading…
Reference in New Issue
Block a user