Skip to content

Sourcery refactored master branch #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Dec 6, 2023

Branch master refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the master branch, then run:

git fetch origin sourcery/master
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from SKAUL05 December 6, 2023 14:30
board = [[None for x in range(BOARD_SIZE)] for y in range(BOARD_SIZE)]
board = [[None for _ in range(BOARD_SIZE)] for _ in range(BOARD_SIZE)]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function Game.board refactored with the following changes:

Comment on lines -55 to +60
if form.is_valid():
move.save()
return redirect("gameplay_detail", id)
else:
if not form.is_valid():
return render(
request, "gameplay/game_detail.html", {"game": game, "form": form}
)
move.save()
return redirect("gameplay_detail", id)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function make_move refactored with the following changes:

Comment on lines -50 to +59
if request.method == "POST":
if "accept" in request.POST:
game = Game.manager.create(
firstPlayer=invitation.toUser, secondPlayer=invitation.fromUser,
)
invitation.delete()
return redirect(game)
else:
if request.method != "POST":
return render(
request, "player/accept_invitation_form.html", {"invitation": invitation}
)
if "accept" in request.POST:
game = Game.manager.create(
firstPlayer=invitation.toUser, secondPlayer=invitation.fromUser,
)
invitation.delete()
return redirect(game)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function accept_invitation refactored with the following changes:

x = 5
y = 6
assert x + 1 == y, "test failed"
pass
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function test_file1_method1 refactored with the following changes:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants