Skip to content

Commit

Permalink
Revert "optimize/reorder all imports"
Browse files Browse the repository at this point in the history
This reverts commit e3a3680.
  • Loading branch information
JasonLovesDoggo committed Jan 6, 2024
1 parent e3a3680 commit a28e1f5
Show file tree
Hide file tree
Showing 29 changed files with 261 additions and 259 deletions.
6 changes: 3 additions & 3 deletions judge/admin/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
from judge.dblock import LockModel
from judge.models import BlogPost, NavigationBar
from judge.widgets import (
AdminHeavySelect2MultipleWidget,
AdminHeavySelect2Widget,
AdminMartorWidget,
AdminHeavySelect2MultipleWidget,
AdminHeavySelect2Widget,
AdminMartorWidget,
)


Expand Down
24 changes: 12 additions & 12 deletions judge/admin/problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@
from reversion.admin import VersionAdmin

from judge.models import (
LanguageLimit,
Problem,
ProblemClarification,
ProblemPointsVote,
ProblemTranslation,
Profile,
Solution,
LanguageLimit,
Problem,
ProblemClarification,
ProblemPointsVote,
ProblemTranslation,
Profile,
Solution,
)
from judge.utils.views import NoBatchDeleteMixin
from judge.widgets import (
AdminHeavySelect2MultipleWidget,
AdminMartorWidget,
AdminSelect2MultipleWidget,
AdminSelect2Widget,
CheckboxSelectMultipleWithSelectAll,
AdminHeavySelect2MultipleWidget,
AdminMartorWidget,
AdminSelect2MultipleWidget,
AdminSelect2Widget,
CheckboxSelectMultipleWithSelectAll,
)


Expand Down
14 changes: 7 additions & 7 deletions judge/admin/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@

from django_ace import AceWidget
from judge.models import (
ContestParticipation,
ContestProblem,
ContestSubmission,
Profile,
Submission,
SubmissionSource,
SubmissionTestCase,
ContestParticipation,
ContestProblem,
ContestSubmission,
Profile,
Submission,
SubmissionSource,
SubmissionTestCase,
)
from judge.utils.raw_sql import use_straight_join

Expand Down
6 changes: 3 additions & 3 deletions judge/admin/ticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

from judge.models import TicketMessage
from judge.widgets import (
AdminHeavySelect2MultipleWidget,
AdminHeavySelect2Widget,
AdminMartorWidget,
AdminHeavySelect2MultipleWidget,
AdminHeavySelect2Widget,
AdminMartorWidget,
)


Expand Down
34 changes: 17 additions & 17 deletions judge/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,34 @@
from django.core.validators import RegexValidator
from django.db.models import Q
from django.forms import (
BooleanField,
CharField,
ChoiceField,
Form,
ModelForm,
MultipleChoiceField,
BooleanField,
CharField,
ChoiceField,
Form,
ModelForm,
MultipleChoiceField,
)
from django.urls import reverse_lazy
from django.utils.text import format_lazy
from django.utils.translation import gettext_lazy as _, ngettext_lazy

from django_ace import AceWidget
from judge.models import (
Contest,
Language,
Organization,
Problem,
ProblemPointsVote,
Profile,
Submission,
WebAuthnCredential,
Contest,
Language,
Organization,
Problem,
ProblemPointsVote,
Profile,
Submission,
WebAuthnCredential,
)
from judge.utils.mail import validate_email_domain
from judge.utils.subscription import newsletter_id
from judge.widgets import (
HeavyPreviewPageDownWidget,
Select2MultipleWidget,
Select2Widget,
HeavyPreviewPageDownWidget,
Select2MultipleWidget,
Select2Widget,
)

TOTP_CODE_LENGTH = 6
Expand Down
28 changes: 14 additions & 14 deletions judge/jinja2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@
from judge.highlight_code import highlight_code
from judge.user_translations import gettext
from . import (
camo,
datetime,
filesize,
format,
gravatar,
language,
markdown,
rating,
reference,
render,
social,
spaceless,
submission,
timedelta,
camo,
datetime,
filesize,
format,
gravatar,
language,
markdown,
rating,
reference,
render,
social,
spaceless,
submission,
timedelta,
)
from . import registry

Expand Down
8 changes: 4 additions & 4 deletions judge/jinja2/render.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from django.template import (
Context,
Template as DjangoTemplate,
TemplateSyntaxError as DjangoTemplateSyntaxError,
VariableDoesNotExist,
Context,
Template as DjangoTemplate,
TemplateSyntaxError as DjangoTemplateSyntaxError,
VariableDoesNotExist,
)

from . import registry
Expand Down
4 changes: 2 additions & 2 deletions judge/jinja2/social.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from django.template.loader import get_template
from django.utils.safestring import mark_safe
from django_social_share.templatetags.social_share import (
post_to_facebook_url,
post_to_twitter_url,
post_to_facebook_url,
post_to_twitter_url,
)

from . import registry
Expand Down
72 changes: 36 additions & 36 deletions judge/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
from reversion import revisions

from judge.models.choices import (
ACE_THEMES,
EFFECTIVE_MATH_ENGINES,
MATH_ENGINES_CHOICES,
TIMEZONE,
ACE_THEMES,
EFFECTIVE_MATH_ENGINES,
MATH_ENGINES_CHOICES,
TIMEZONE,
)
from judge.models.comment import Comment, CommentLock, CommentVote
from judge.models.contest import (
Contest,
ContestMoss,
ContestParticipation,
ContestProblem,
ContestSubmission,
ContestTag,
Rating,
Contest,
ContestMoss,
ContestParticipation,
ContestProblem,
ContestSubmission,
ContestTag,
Rating,
)
from judge.models.interface import BlogPost, MiscConfig, NavigationBar, validate_regex
from judge.models.problem import (
LanguageLimit,
License,
Problem,
ProblemClarification,
ProblemGroup,
ProblemPointsVote,
ProblemTranslation,
ProblemType,
Solution,
SubmissionSourceAccess,
TranslatedProblemQuerySet,
LanguageLimit,
License,
Problem,
ProblemClarification,
ProblemGroup,
ProblemPointsVote,
ProblemTranslation,
ProblemType,
Solution,
SubmissionSourceAccess,
TranslatedProblemQuerySet,
)
from judge.models.problem_data import (
CHECKERS,
ProblemData,
ProblemTestCase,
problem_data_storage,
problem_directory_file,
CHECKERS,
ProblemData,
ProblemTestCase,
problem_data_storage,
problem_directory_file,
)
from judge.models.profile import (
Class,
Organization,
OrganizationRequest,
Profile,
WebAuthnCredential,
Class,
Organization,
OrganizationRequest,
Profile,
WebAuthnCredential,
)
from judge.models.runtime import Judge, Language, RuntimeVersion
from judge.models.submission import (
SUBMISSION_RESULT,
Submission,
SubmissionSource,
SubmissionTestCase,
SUBMISSION_RESULT,
Submission,
SubmissionSource,
SubmissionTestCase,
)
from judge.models.ticket import Ticket, TicketMessage

Expand Down
8 changes: 4 additions & 4 deletions judge/models/tests/test_contest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from judge.models import Contest, ContestParticipation, ContestTag
from judge.models.contest import MinValueOrNoneValidator
from judge.models.tests.util import (
CommonDataMixin,
create_contest,
create_contest_participation,
create_user,
CommonDataMixin,
create_contest,
create_contest_participation,
create_user,
)


Expand Down
16 changes: 8 additions & 8 deletions judge/models/tests/test_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
from judge.models import Language, LanguageLimit, Problem, Submission
from judge.models.problem import VotePermission, disallowed_characters_validator
from judge.models.tests.util import (
CommonDataMixin,
create_contest,
create_contest_participation,
create_organization,
create_problem,
create_problem_type,
create_solution,
create_user,
CommonDataMixin,
create_contest,
create_contest_participation,
create_organization,
create_problem,
create_problem_type,
create_solution,
create_user,
)


Expand Down
6 changes: 3 additions & 3 deletions judge/models/tests/test_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

from judge.models import Profile
from judge.models.tests.util import (
CommonDataMixin,
create_contest,
create_contest_participation,
CommonDataMixin,
create_contest,
create_contest_participation,
)


Expand Down
12 changes: 6 additions & 6 deletions judge/models/tests/test_submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

from judge.models import ContestSubmission, Language, Submission, SubmissionSource
from judge.models.tests.util import (
CommonDataMixin,
create_contest,
create_contest_participation,
create_contest_problem,
create_problem,
create_user,
CommonDataMixin,
create_contest,
create_contest_participation,
create_contest_problem,
create_problem,
create_user,
)


Expand Down
24 changes: 12 additions & 12 deletions judge/models/tests/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
from django.utils import timezone

from judge.models import (
BlogPost,
Contest,
ContestParticipation,
ContestProblem,
ContestTag,
Language,
Organization,
Problem,
ProblemGroup,
ProblemType,
Profile,
Solution,
BlogPost,
Contest,
ContestParticipation,
ContestProblem,
ContestTag,
Language,
Organization,
Problem,
ProblemGroup,
ProblemType,
Profile,
Solution,
)


Expand Down
1 change: 1 addition & 0 deletions judge/utils/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from django.template import loader
from django.utils.translation import gettext


bad_mail_regex: List[Pattern[str]] = list(
map(re.compile, settings.BAD_MAIL_PROVIDER_REGEX)
)
Expand Down
Loading

0 comments on commit a28e1f5

Please sign in to comment.