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

Fix ruff #89

Closed
wants to merge 1 commit into from
Closed

Fix ruff #89

wants to merge 1 commit into from

Conversation

snaselj
Copy link
Contributor

@snaselj snaselj commented Feb 21, 2024

Closes: NaN

What's Changed

  • Fixed running ruff linter with invoke autoformat.
  • Refactored invoke ruff to be better readable.
  • Moved ruff linter rules from deprecated location.

@snaselj snaselj marked this pull request as ready for review February 21, 2024 15:00
)
def ruff(context, action="lint", fix=False, output_format="text"):
def ruff(context, action=["lint"], fix=False, output_format="full"):
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this ok? I don't remember when mutable can't be used, I know there should not be an empty list, but would this be preferred?

def ruff(context, action=None, fix=False, output_format="full"):
    if action is None:
        action = ["lint"]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point.

In the end, seems to me better to split it to two separate tasks, as it has different args anyway.

The proposal is here, could you check it pls.?

nautobot/nautobot-app-dev-example#5

Overall, I would rather process approvals in nautobot-app-dev-example as there it's much easier to test changes. After the approval there, pull request to this repository cookiecutter-nautobot-app will be backported.

@snaselj
Copy link
Contributor Author

snaselj commented Feb 23, 2024

Closing as duplicate #91

@snaselj snaselj closed this Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants