Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#260)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ryan Mast <mast9@llnl.gov>
  • Loading branch information
pre-commit-ci[bot] and nightlark authored Oct 7, 2024
1 parent a795327 commit 45db03e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
exclude: ^(.gitignore|generate_sbom.py|extract_file_info.py|pe_info.py)
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.5
rev: v0.6.9
hooks:
# Run the linter
- id: ruff
args: [ --fix ]
# Run the formatter
- id: ruff-format
- repo: https://github.com/pycqa/pylint
rev: v3.2.7
rev: v3.3.1
hooks:
- id: pylint
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: mixed-line-ending
- id: end-of-file-fixer
Expand Down
3 changes: 3 additions & 0 deletions surfactant/cmd/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def get_software_entry(
pluginmanager,
parent_sbom: SBOM,
filepath,
*, # arguments past this point are keyword-only
filetype=None,
container_uuid=None,
root_path=None,
Expand Down Expand Up @@ -248,6 +249,8 @@ def get_default_from_config(option: str, fallback: Optional[Any] = None) -> Any:
required=False,
help="Include all files in the SBOM, not just those recognized by Surfactant",
)
# Disable positional argument linter check -- could make keyword-only, but then defaults need to be set
# pylint: disable-next=too-many-positional-arguments
def sbom(
config_file,
sbom_outfile,
Expand Down
1 change: 1 addition & 0 deletions surfactant/output/spdx_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ def create_spdx_package(
name: str,
summary,
supplier,
*, # all remaining arguments are keyword-only
file_name: Optional[str] = None,
version: Optional[str] = None,
sha1: Optional[str] = None,
Expand Down
1 change: 1 addition & 0 deletions surfactant/plugin/hookspecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def identify_file_type(filepath: str) -> Optional[str]:


@hookspec
# pylint: disable-next=too-many-positional-arguments
def extract_file_info(
sbom: SBOM,
software: Software,
Expand Down
1 change: 1 addition & 0 deletions surfactant/sbomtypes/_sbom.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ def add_software_entries(
# pylint: disable=too-many-arguments
def create_software(
self,
*, # all arguments are keyword-only
name: Optional[str] = None,
size: Optional[int] = None,
sha1: Optional[str] = None,
Expand Down

0 comments on commit 45db03e

Please sign in to comment.