-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
refactor: Clean up after conversion of contentserver to view #35559
Conversation
Remove class declaration and simply de-indent contents by 4 spaces. This results in broken code due to lingering `self` references, but should make diffs easier to understand.
Some lingering cleanup from the transition from a middleware to a view. See #34702 for context. - Remove IMPL and self/StaticContentServer references - Add newlines to satisfy code style linter - Fix test references - Update module docstring
Several now-irrelevant lint-disables and one legit one that was easy to fix.
4387954
to
7b1519f
Compare
try: | ||
content = AssetManager.find(location, as_stream=True) | ||
except (ItemNotFoundError, NotFoundError): # lint-amnesty, pylint: disable=try-except-raise | ||
raise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was this doing, and did you remove it because it should do the same with and without?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's basically a no-op -- the lint documentation notes that a bare raise as the first line of a sole except block is pointless. (Raising something else, or having multiple except blocks with different behavior, or having other stuff before the raise -- those would not be covered by this lint.)
It never did anything other than this, so I think it was imitating some similar code that instead of raising would return a 404.
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
2U Release Notice: This PR has been deployed to the edX production environment. |
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
2U Release Notice: This PR has been deployed to the edX production environment. |
1 similar comment
2U Release Notice: This PR has been deployed to the edX production environment. |
Last bit of work planned for #34702
Best reviewed commit-by-commit. First commit is an indentation change that results in broken code; second commit fixes things up; third commit addresses some old lint while we're in there.