Open
Conversation
yitzhakc
requested changes
Feb 18, 2025
|
|
||
| django.setup() | ||
|
|
||
| from sefaria.model import * |
There was a problem hiding this comment.
Did you purposely put this import below the django.setup()? PEP8 recommends having all the imports at the top
Contributor
Author
There was a problem hiding this comment.
Yes, if I recall correctly, django.setup() is necessary before importing the model, although it lends itself to a clunky import section at the top of the file.
|
|
||
| django.setup() | ||
|
|
||
| from sefaria.model import * |
There was a problem hiding this comment.
PEP8 recommends not to import everything from a package (... import *) and only import the things you need, even when it's a long list - due to potential namespace pollution and reduced code readability
Contributor
Author
There was a problem hiding this comment.
Correct, except for sefaria.model I was told this is best practice.
See here
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Script to rename the Bavli Chapters (English) with their transliterated names, as well as one correction for the Hebrew name of Bava Kamma 2.