From 39df28743bfbdae865873fcdd6c600b2208a1234 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Wed, 7 Aug 2024 13:53:37 -0400 Subject: [PATCH] Apply a few more Ruff rules - flake8-implicit-str-concat (ISC) - flake8-quotes (Q) - flake8-pie (PIE) - flake8-logging (LOG) --- membershipworks/tasks/ucsAccounts.py | 2 +- pyproject.toml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/membershipworks/tasks/ucsAccounts.py b/membershipworks/tasks/ucsAccounts.py index 318ffa2..8fb1ed8 100644 --- a/membershipworks/tasks/ucsAccounts.py +++ b/membershipworks/tasks/ucsAccounts.py @@ -67,7 +67,7 @@ async def sync_member(user_mod, member: Member): # set a random password and ensure it is changed at next login user.props.password = "".join( random.choice(string.ascii_letters + string.digits) - for x in range(0, RAND_PW_LEN) + for x in range(RAND_PW_LEN) ) user.props.pwdChangeNextLogin = True diff --git a/pyproject.toml b/pyproject.toml index acb3795..1c96d4a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,8 @@ admin_email = "cmsmanage.django_q2_admin_email_reporter:AdminEmailReporter" line-length = 88 [tool.ruff.lint] -select = ["E4", "E7", "E9", "F", "I", "C4", "UP", "PERF", "PL", "SIM", "FIX003", "DJ012", "A", "INP"] +select = ["E4", "E7", "E9", "F", "I", "C4", "UP", "PERF", "PL", "SIM", "FIX003", "DJ012", "A", "INP", "ISC", "Q", "PIE", "LOG"] +ignore = ["ISC001"] [tool.ruff.lint.isort] known-first-party = [