From 3e5c2d38e91dde16269a64c7735f32d4fcc96b5d Mon Sep 17 00:00:00 2001 From: Stephen Kiely Date: Thu, 22 Aug 2024 16:01:17 -0500 Subject: [PATCH] Update comments on post_gen_project and models.py (#150) * Update comments on post_gen_project and models.py * Use invoke and fix for Ruff * Update nautobot-app/hooks/post_gen_project.py Co-authored-by: Gary Snider <75227981+gsnider2195@users.noreply.github.com> * Update chatops post_gen_project --------- Co-authored-by: Gary Snider <75227981+gsnider2195@users.noreply.github.com> --- nautobot-app-chatops/hooks/post_gen_project.py | 2 +- nautobot-app/hooks/post_gen_project.py | 2 +- .../{{ cookiecutter.app_name }}/models.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nautobot-app-chatops/hooks/post_gen_project.py b/nautobot-app-chatops/hooks/post_gen_project.py index 0bc630f1..533cff08 100644 --- a/nautobot-app-chatops/hooks/post_gen_project.py +++ b/nautobot-app-chatops/hooks/post_gen_project.py @@ -15,7 +15,7 @@ * poetry install * poetry shell * invoke makemigrations -* ruff . # this will ensure all python files are formatted correctly, may require `sudo chown -R ./` as migrations may be owned by root +* inv ruff --fix # this will ensure all python files are formatted correctly, may require `sudo chown -R $USER ./` as migrations may be owned by root The file `creds.env` will be ignored by git and can be used to override default environment variables. """ diff --git a/nautobot-app/hooks/post_gen_project.py b/nautobot-app/hooks/post_gen_project.py index 481a4891..d99618ca 100644 --- a/nautobot-app/hooks/post_gen_project.py +++ b/nautobot-app/hooks/post_gen_project.py @@ -15,7 +15,7 @@ * poetry install * poetry shell * invoke makemigrations -* ruff . # this will ensure all python files are formatted correctly, may require `sudo chown -R ./` as migrations may be owned by root +* invoke ruff --fix # this will ensure all python files are formatted correctly, may require `sudo chown -R $USER ./` as migrations may be owned by root The file `creds.env` will be ignored by git and can be used to override default environment variables. """ diff --git a/nautobot-app/{{ cookiecutter.project_slug }}/{{ cookiecutter.app_name }}/models.py b/nautobot-app/{{ cookiecutter.project_slug }}/{{ cookiecutter.app_name }}/models.py index 0c0b1e89..672be143 100644 --- a/nautobot-app/{{ cookiecutter.project_slug }}/{{ cookiecutter.app_name }}/models.py +++ b/nautobot-app/{{ cookiecutter.project_slug }}/{{ cookiecutter.app_name }}/models.py @@ -6,7 +6,7 @@ # Nautobot imports from nautobot.apps.models import PrimaryModel -# from nautobot.extras.utils import extras_features +# from nautobot.apps.models import extras_features # If you want to use the extras_features decorator please reference the following documentation # https://docs.nautobot.com/projects/core/en/latest/plugins/development/#using-the-extras_features-decorator-for-graphql # Then based on your reading you may decide to put the following decorator before the declaration of your class