Skip to content

Commit

Permalink
lint: more fixes and ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
asadali145 committed Aug 27, 2024
1 parent 7a193ff commit 0ef3c78
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 23 deletions.
12 changes: 6 additions & 6 deletions authentication/pipeline/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ def create_user_via_email( # noqa: C901
strategy,
backend,
user=None,
flow=None,
flow=None, # noqa: ARG001
current_partial=None,
*args,
**kwargs, # noqa: ARG001
*args, # noqa: ARG001
**kwargs,
):
"""
Creates a new user if needed and sets the password and name.
Expand Down Expand Up @@ -144,9 +144,9 @@ def create_profile(
strategy,
backend,
user=None,
flow=None,
flow=None, # noqa: ARG001
current_partial=None,
*args,
*args, # noqa: ARG001
**kwargs, # noqa: ARG001
):
"""
Expand Down Expand Up @@ -188,7 +188,7 @@ def validate_password(
user=None,
flow=None,
current_partial=None,
*args,
*args, # noqa: ARG001
**kwargs, # noqa: ARG001
):
"""
Expand Down
4 changes: 2 additions & 2 deletions klasses/commands_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def run_command(command, *args, **kwargs):
run_command("manage_certificates", run=bootcamp_run.id, **command_kwargs)
patched_method.assert_called_once_with(
users_to_unblock,
False,
bootcamp_run, # noqa: FBT003
False, # noqa: FBT003
bootcamp_run,
)
else:
run_command(
Expand Down
8 changes: 4 additions & 4 deletions klasses/management/commands/manage_certificates.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,15 @@ def handle(self, *args, **options): # noqa: ARG002, C901
if users_to_block:
result = manage_user_certificate_blocking(
users_to_block,
True,
bootcamp_run, # noqa: FBT003
True, # noqa: FBT003
bootcamp_run,
)
self.show_message(**result)
elif users_to_unblock:
result = manage_user_certificate_blocking(
users_to_unblock,
False,
bootcamp_run, # noqa: FBT003
False, # noqa: FBT003
bootcamp_run,
)
self.show_message(**result)
elif revoke and user and bootcamp_run:
Expand Down
4 changes: 2 additions & 2 deletions localdev/seed/app_state_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ def is_fulfilled(application): # noqa: D102
@staticmethod
def _fulfill(application, **kwargs): # noqa: ARG004
with open( # noqa: PTH123
os.path.join(settings.BASE_DIR, DUMMY_RESUME_FILEPATH),
"rb", # noqa: PTH118
os.path.join(settings.BASE_DIR, DUMMY_RESUME_FILEPATH), # noqa: PTH118
"rb",
) as resume_file:
application.add_resume(
resume_file=File(resume_file, name=DUMMY_RESUME_FILENAME),
Expand Down
16 changes: 8 additions & 8 deletions mail/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ def test_send_batch_chunk(settings, mock_post):
settings.MAILGUN_RECIPIENT_OVERRIDE = None
chunk_size = 10
recipient_tuples = [
("{0}@example.com".format(letter), None)
for letter in string.ascii_letters # noqa: UP030
("{0}@example.com".format(letter), None) # noqa: UP030
for letter in string.ascii_letters
]
chunked_emails_to = [
recipient_tuples[i : i + chunk_size]
Expand Down Expand Up @@ -209,8 +209,8 @@ def test_send_batch_400_no_raise(settings, mocker, mock_post, mocked_json):

chunk_size = 10
recipient_tuples = [
("{0}@example.com".format(letter), None)
for letter in string.ascii_letters # noqa: UP030
("{0}@example.com".format(letter), None) # noqa: UP030
for letter in string.ascii_letters
]
assert len(recipient_tuples) == 52
settings.MAILGUN_RECIPIENT_OVERRIDE = None
Expand Down Expand Up @@ -238,8 +238,8 @@ def test_send_batch_exception(settings, mock_post):

chunk_size = 10
recipient_tuples = [
("{0}@example.com".format(letter), None)
for letter in string.ascii_letters # noqa: UP030
("{0}@example.com".format(letter), None) # noqa: UP030
for letter in string.ascii_letters
]
chunked_emails_to = [
recipient_tuples[i : i + chunk_size]
Expand Down Expand Up @@ -284,8 +284,8 @@ def test_send_batch_improperly_configured(settings, mocker, mock_post):

chunk_size = 10
recipient_pairs = [
("{0}@example.com".format(letter), None)
for letter in string.ascii_letters # noqa: UP030
("{0}@example.com".format(letter), None) # noqa: UP030
for letter in string.ascii_letters
]
with pytest.raises(ImproperlyConfigured) as ex:
MailgunClient.send_batch(
Expand Down
1 change: 0 additions & 1 deletion main/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

from main.sentry import init_sentry


VERSION = "0.122.0"

ENVIRONMENT = get_string(
Expand Down

0 comments on commit 0ef3c78

Please sign in to comment.