Skip to content

Commit

Permalink
Bump: Ruff to 0.8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
gmuloc committed Jan 2, 2025
1 parent 530e162 commit 5302111
Show file tree
Hide file tree
Showing 57 changed files with 57 additions and 57 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ repos:
- --no-extra-eol

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.2
rev: v0.8.4
hooks:
- id: ruff
name: Run Ruff linter
Expand Down
2 changes: 1 addition & 1 deletion j2lint/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""__init__.py - A command-line utility that checks for best practices in Jinja2."""
Expand Down
2 changes: 1 addition & 1 deletion j2lint/__main__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""__main__.py - A command-line utility that checks for best practices in Jinja2."""
Expand Down
2 changes: 1 addition & 1 deletion j2lint/cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""cli.py - Command line argument parser."""
Expand Down
2 changes: 1 addition & 1 deletion j2lint/linter/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""j2lint.linter packages."""
2 changes: 1 addition & 1 deletion j2lint/linter/collection.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""collection.py - Class to create a collection of linting rules."""
Expand Down
2 changes: 1 addition & 1 deletion j2lint/linter/error.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""error.py - Error classes to format the lint errors."""
Expand Down
2 changes: 1 addition & 1 deletion j2lint/linter/indenter/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""j2lint.linter.indenter submodule."""
2 changes: 1 addition & 1 deletion j2lint/linter/indenter/node.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""node.py - Class node for creating a parse tree for jinja statements and checking jinja statement indentation."""
Expand Down
2 changes: 1 addition & 1 deletion j2lint/linter/indenter/statement.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""statement.py - Class and variables for jinja statements."""
Expand Down
2 changes: 1 addition & 1 deletion j2lint/linter/rule.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""rule.py - Base class for all the lint rules with functions for matching line and text based rule."""
Expand Down
2 changes: 1 addition & 1 deletion j2lint/linter/runner.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""runner.py - Class to run the rules collection for all the files."""
Expand Down
2 changes: 1 addition & 1 deletion j2lint/logger.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""logger.py - Creates logger object."""
Expand Down
2 changes: 1 addition & 1 deletion j2lint/rules/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""j2lint built-in rules."""
2 changes: 1 addition & 1 deletion j2lint/rules/jinja_operator_has_spaces_rule.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""jinja_operator_has_spaces_rule.py - Rule class to check if operator has surrounding spaces."""
Expand Down
2 changes: 1 addition & 1 deletion j2lint/rules/jinja_statement_delimiter_rule.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""jinja_statement_delimiter_rule.py - Rule class to check if jinja delimiters are wrong."""
Expand Down
2 changes: 1 addition & 1 deletion j2lint/rules/jinja_statement_has_spaces_rule.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""jinja_statement_has_spaces_rule.py - Rule class to check if jinja statement has at least a single space surrounding the delimiter."""
Expand Down
2 changes: 1 addition & 1 deletion j2lint/rules/jinja_template_indentation_rule.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""jinja_template_indentation_rule.py - Rule class to check the jinja statement indentation is correct."""
Expand Down
2 changes: 1 addition & 1 deletion j2lint/rules/jinja_template_no_tabs_rule.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""jinja_template_no_tabs_rule.py - Rule class to check the file does not use tabs for indentation."""
Expand Down
2 changes: 1 addition & 1 deletion j2lint/rules/jinja_template_single_statement_rule.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""jinja_template_single_statement_rule.py - Rule class to check if only a single jinja statement is present on each line."""
Expand Down
2 changes: 1 addition & 1 deletion j2lint/rules/jinja_template_syntax_error_rule.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""jinja_template_syntax_error_rule.py - Rule class to check that file does not have jinja syntax errors."""
Expand Down
2 changes: 1 addition & 1 deletion j2lint/rules/jinja_variable_has_space_rule.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""jinja_variable_has_space_rule.py - Rule class to check if jinja variables have single space between curly brackets and variable name."""
Expand Down
2 changes: 1 addition & 1 deletion j2lint/rules/jinja_variable_name_case_rule.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""jinja_variable_name_case_rule.py - Rule class to check the variables use lower case."""
Expand Down
2 changes: 1 addition & 1 deletion j2lint/rules/jinja_variable_name_format_rule.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""jinja_variable_name_format_rule.py - Rule class to check that variable names only use underscores."""
Expand Down
2 changes: 1 addition & 1 deletion j2lint/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""utils.py - Utility functions for jinja2 linter."""
Expand Down
2 changes: 1 addition & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""Tests for j2lint."""
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""Pytest fixtures for j2lint testing."""
Expand Down
2 changes: 1 addition & 1 deletion tests/data/test.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{#
Copyright (c) 2021-2024 Arista Networks, Inc.
Copyright (c) 2021-2025 Arista Networks, Inc.
Use of this source code is governed by the MIT license
that can be found in the LICENSE file.
#}
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""Tests for j2lint.cli.py."""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_linter/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""Test for j2lint.linter."""
2 changes: 1 addition & 1 deletion tests/test_linter/data/disable-rule-3.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{#
Copyright (c) 2021-2024 Arista Networks, Inc.
Copyright (c) 2021-2025 Arista Networks, Inc.
Use of this source code is governed by the MIT license
that can be found in the LICENSE file.
#}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_linter/data/test.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{#
Copyright (c) 2021-2024 Arista Networks, Inc.
Copyright (c) 2021-2025 Arista Networks, Inc.
Use of this source code is governed by the MIT license
that can be found in the LICENSE file.
#}
2 changes: 1 addition & 1 deletion tests/test_linter/test_collection.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""Tests for j2lint.linter.collection.py."""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_linter/test_error.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""Tests for j2lint.linter.error.py."""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_linter/test_indenter/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""Tests for j2lint.linter.indenter."""
2 changes: 1 addition & 1 deletion tests/test_linter/test_indenter/test_node.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""Tests for j2lint.linter.node.py."""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_linter/test_indenter/test_statement.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""Tests for j2lint.linter.indenter.statement.py.
Expand Down
2 changes: 1 addition & 1 deletion tests/test_linter/test_rule.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""Tests for j2lint.linter.rule.py."""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_linter/test_runner.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""Tests for j2lint.linter.runner.py."""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_logger.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""Tests for j2lint.logger.py."""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_rules/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""Tests for j2lint.rules."""
2 changes: 1 addition & 1 deletion tests/test_rules/data/jinja_operator_has_spaces_rule.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{#
Copyright (c) 2021-2024 Arista Networks, Inc.
Copyright (c) 2021-2025 Arista Networks, Inc.
Use of this source code is governed by the MIT license
that can be found in the LICENSE file.
#}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_rules/data/jinja_statement_delimiter_rule.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{#
Copyright (c) 2021-2024 Arista Networks, Inc.
Copyright (c) 2021-2025 Arista Networks, Inc.
Use of this source code is governed by the MIT license
that can be found in the LICENSE file.
#}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_rules/data/jinja_statement_has_spaces_rule.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{#
Copyright (c) 2021-2024 Arista Networks, Inc.
Copyright (c) 2021-2025 Arista Networks, Inc.
Use of this source code is governed by the MIT license
that can be found in the LICENSE file.
#}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{#
Copyright (c) 2021-2024 Arista Networks, Inc.
Copyright (c) 2021-2025 Arista Networks, Inc.
Use of this source code is governed by the MIT license
that can be found in the LICENSE file.
#}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{#
Copyright (c) 2021-2024 Arista Networks, Inc.
Copyright (c) 2021-2025 Arista Networks, Inc.
Use of this source code is governed by the MIT license
that can be found in the LICENSE file.
#}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_rules/data/jinja_template_indentation_rule.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{#
Copyright (c) 2021-2024 Arista Networks, Inc.
Copyright (c) 2021-2025 Arista Networks, Inc.
Use of this source code is governed by the MIT license
that can be found in the LICENSE file.
#}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{#
Copyright (c) 2021-2024 Arista Networks, Inc.
Copyright (c) 2021-2025 Arista Networks, Inc.
Use of this source code is governed by the MIT license
that can be found in the LICENSE file.
#}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_rules/data/jinja_template_no_tabs_rule.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{#
Copyright (c) 2021-2024 Arista Networks, Inc.
Copyright (c) 2021-2025 Arista Networks, Inc.
Use of this source code is governed by the MIT license
that can be found in the LICENSE file.
#}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{#
Copyright (c) 2021-2024 Arista Networks, Inc.
Copyright (c) 2021-2025 Arista Networks, Inc.
Use of this source code is governed by the MIT license
that can be found in the LICENSE file.
#}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_rules/data/jinja_template_syntax_error_rule.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{#
Copyright (c) 2021-2024 Arista Networks, Inc.
Copyright (c) 2021-2025 Arista Networks, Inc.
Use of this source code is governed by the MIT license
that can be found in the LICENSE file.
#}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_rules/data/jinja_variable_has_space_rule.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{#
Copyright (c) 2021-2024 Arista Networks, Inc.
Copyright (c) 2021-2025 Arista Networks, Inc.
Use of this source code is governed by the MIT license
that can be found in the LICENSE file.
#}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_rules/data/jinja_variable_name_case_rule.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{#
Copyright (c) 2021-2024 Arista Networks, Inc.
Copyright (c) 2021-2025 Arista Networks, Inc.
Use of this source code is governed by the MIT license
that can be found in the LICENSE file.
#}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_rules/data/jinja_variable_name_format_rule.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{#
Copyright (c) 2021-2024 Arista Networks, Inc.
Copyright (c) 2021-2025 Arista Networks, Inc.
Use of this source code is governed by the MIT license
that can be found in the LICENSE file.
#}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_rules/test_rules.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""Tests for rules."""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""Tests for j2lint.utils.py."""
Expand Down
2 changes: 1 addition & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021-2024 Arista Networks, Inc.
# Copyright (c) 2021-2025 Arista Networks, Inc.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
"""utils.py - functions to assist with tests."""
Expand Down

0 comments on commit 5302111

Please sign in to comment.