-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
path info according to __file__
#223
Comments
Sorry, I don't understand your problem 😞 Can you please post a reproduction? I guess a separate github repo would be the best form here. |
I have no public github so let me explain a little bit more detail here:
In this configuration, the
I hope this will be sufficient to explain my issue. Thank you! |
I'm experiencing the same issue. Here's the problem as I understand it: Let's say I have my_path = Path(__file__).parent And I also have from project.settings.components.module_one import my_path
my_other_path = my_path Now, when
For now I work around the problem by fixing all paths that are calculated relative to |
I just came across this issue and I noticed that the variables that are processed by the
Would just be:
Without the import, and you'll have VAR2 available even if you do not import it. And no double import. However bear in mind that if you have an IDE or mypy in place it's gonna complain, so that's not too clean either. |
Hi,
Above all, thank you for sharing this great package.
I have a setting according to the
__file__
, but the file location is not based on the file itself, but theinclude
calling file. For example, when I have setting files as:and if assume that
include
is callingcomponents/common.py
that contains the__file__
based setting. I expected the__file__ == settings/components/common.py
but the actual value issettings.__init__.py
.if I have another setting in
components/others.py
and need to importfrom settings.components.common import VARS
where the VARS is the setting based on__file__
, then the value of the VARS becomes different.Can I have any hint to solve this conflict? Thank you!
The text was updated successfully, but these errors were encountered: