diff --git a/membershipworks/membershipworks_api.py b/membershipworks/membershipworks_api.py index 0244336..2097023 100644 --- a/membershipworks/membershipworks_api.py +++ b/membershipworks/membershipworks_api.py @@ -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 diff --git a/membershipworks/tasks/scrape.py b/membershipworks/tasks/scrape.py index bb01295..03b7a26 100644 --- a/membershipworks/tasks/scrape.py +++ b/membershipworks/tasks/scrape.py @@ -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 - ] + t["Account ID"] == t.get("uid", "") and t["Payment ID"] == t.get("sid", "") + for t in transactions ) for csv_transaction in transactions: diff --git a/pyproject.toml b/pyproject.toml index 4c281ad..8eae21c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 = [