Skip to content
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

Improve import locations #2280

Merged
merged 1 commit into from
Aug 26, 2023
Merged

Improve import locations #2280

merged 1 commit into from
Aug 26, 2023

Conversation

int-y1
Copy link
Contributor

@int-y1 int-y1 commented Aug 26, 2023

this fixes 1% of mypy errors

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 72.72% and no project coverage change.

Comparison is base (b698088) 47.05% compared to head (ca98df6) 47.05%.
Report is 4 commits behind head on master.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2280   +/-   ##
=======================================
  Coverage   47.05%   47.05%           
=======================================
  Files         249      249           
  Lines       13209    13209           
=======================================
  Hits         6215     6215           
  Misses       6994     6994           
Files Changed Coverage Δ
dmoj/urls.py 89.47% <ø> (ø)
judge/utils/problems.py 26.86% <0.00%> (ø)
judge/views/problem.py 24.35% <0.00%> (ø)
judge/views/two_factor.py 39.88% <66.66%> (ø)
judge/admin/interface.py 64.95% <100.00%> (+0.30%) ⬆️
judge/highlight_code.py 52.63% <100.00%> (+2.63%) ⬆️
judge/utils/stats.py 83.33% <100.00%> (-2.39%) ⬇️
judge/views/contests.py 28.96% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Riolku
Copy link
Contributor

Riolku commented Aug 26, 2023

Why does this fix mypy errors? Because of the locations of type stubs?

@int-y1
Copy link
Contributor Author

int-y1 commented Aug 26, 2023

Why does this fix mypy errors? Because of the locations of type stubs?

mypy couldn't find the item in the module

judge/highlight_code.py:1: error: Module "django.utils.html" has no attribute "mark_safe"  [attr-defined]
judge/admin/interface.py:3: error: Module "django.contrib.flatpages.admin" has no attribute "FlatpageForm"  [attr-defined]
judge/views/contests.py:27: error: Module "django.views.generic.detail" does not explicitly export attribute "View"  [attr-defined]

Copy link
Member

@kiritofeng kiritofeng left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@kiritofeng kiritofeng added this pull request to the merge queue Aug 26, 2023
Merged via the queue into DMOJ:master with commit 138ce7f Aug 26, 2023
3 checks passed
@int-y1 int-y1 deleted the better-imports branch August 26, 2023 02:02
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.

4 participants