Skip to content

Commit

Permalink
Fix some lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jackrosenthal committed Feb 19, 2024
1 parent e1b75a4 commit f677d2d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
16 changes: 8 additions & 8 deletions algobowl/cli/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ def input():
pass


@input.command(help="Upload your group's input")
@input.command(name="upload", help="Upload your group's input")
@click.argument("file_path", type=pathlib.Path)
@click.pass_obj
def upload(cli, file_path):
def input_upload(cli, file_path):
group_id = get_group_id(cli)
with open(file_path, "rb") as f:
r = cli.session.post(
Expand All @@ -99,10 +99,10 @@ def upload(cli, file_path):
sys.exit(1)


@input.command(help="Download your group's input")
@input.command(name="download", help="Download your group's input")
@click.argument("output_file", type=click.File("w"), default=sys.stdout)
@click.pass_obj
def download(cli, output_file):
def input_download(cli, output_file):
group_id = get_group_id(cli)
r = cli.session.get(cli.config.get_url(f"/files/input_group{group_id}.txt"))
auth.check_response(r)
Expand Down Expand Up @@ -133,10 +133,10 @@ def infer_group_from_path(file_path):
return int(matches[-1])


@output.command(help="Upload output")
@output.command(name="upload", help="Upload output")
@click.argument("file_path", type=pathlib.Path)
@click.pass_obj
def upload(cli, file_path):
def output_upload(cli, file_path):
from_group_id = get_group_id(cli)
to_group_id = cli.to_group_id
if not to_group_id:
Expand All @@ -154,10 +154,10 @@ def upload(cli, file_path):
sys.exit(1)


@output.command(help="Download output")
@output.command(name="download", help="Download output")
@click.argument("file_path", type=pathlib.Path)
@click.pass_obj
def download(cli, file_path):
def output_download(cli, file_path):
from_group_id = get_group_id(cli)
to_group_id = cli.to_group_id
if not to_group_id:
Expand Down
1 change: 0 additions & 1 deletion algobowl/cli/problem.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import concurrent.futures
import io
import random
import sys
from pathlib import Path
Expand Down
6 changes: 3 additions & 3 deletions migration/versions/ce07e37e6826_add_default_to_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"""

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "ce07e37e6826"
down_revision = "8d2d82cd68f4"

import sqlalchemy as sa
from alembic import op


def upgrade():
with op.batch_alter_table("input") as batch_op:
Expand Down

0 comments on commit f677d2d

Please sign in to comment.