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

Community App Store (Sourcery refactored) #151

Merged
merged 1 commit into from
Mar 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions conreq/_core/base/management/commands/start_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ class Command(TemplateCommand):

# pylint: disable=arguments-differ
def handle(self, app_name: str, **options: dict):
package_name = options.get("package")
if not package_name:
package_name = input("Package Name: ").replace(" ", "_")
package_name = options.get("package") or input("Package Name: ").replace(
" ", "_"
)

Comment on lines -14 to +17
Copy link
Author

Choose a reason for hiding this comment

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

Function Command.handle refactored with the following changes:

name = app_name
app_or_project = "app"
target = str(PACKAGES_DIR / package_name / "apps" / "")
Expand Down
4 changes: 2 additions & 2 deletions conreq/utils/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ def set_env(name: str, value: str, sys_env=False, dot_env=True) -> Tuple[str, st
if value is None:
value = ""
if sys_env:
os.environ[ENV_PREFIX + name.upper()] = str(value)
os.environ[ENV_PREFIX + name.upper()] = value
if dot_env:
dotenv.set_key(dotenv_path(), name.upper(), str(value))
dotenv.set_key(dotenv_path(), name.upper(), value)
Comment on lines -152 to +154
Copy link
Author

Choose a reason for hiding this comment

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

Function set_env refactored with the following changes:

return (name, value)


Expand Down