Skip to content
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
3 changes: 3 additions & 0 deletions examples/manual_repo/basic_repo.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2024, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

"""
A TUF repository example using the low-level TUF Metadata API.

Expand Down
3 changes: 3 additions & 0 deletions examples/manual_repo/hashed_bin_delegation.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2025, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

"""
A TUF hash bin delegation example using the low-level TUF Metadata API.

Expand Down
2 changes: 1 addition & 1 deletion examples/manual_repo/succinct_hash_bin_delegations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright New York University and the TUF contributors
# Copyright 2022-2024, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0
"""
A TUF succinct hash bin delegation example using the low-level TUF Metadata API.
Expand Down
4 changes: 2 additions & 2 deletions requirements/lint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
# Lint tools
# (We are not so interested in the specific versions of the tools: the versions
# are pinned to prevent unexpected linting failures when tools update)
ruff==0.15.22
ruff==0.16.2
mypy==2.3.0
zizmor==1.26.1
zizmor==1.29.0

# Required for type stubs
freezegun==1.5.5
2 changes: 1 addition & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
-r pinned.txt

# coverage measurement
coverage[toml]==7.15.2
coverage[toml]==7.15.4
freezegun==1.5.5
2 changes: 2 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright 2013-2024, the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0
2 changes: 2 additions & 0 deletions tests/generated_data/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright 2013-2022, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0
6 changes: 3 additions & 3 deletions tests/generated_data/generate_md.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Script for generating new metadata files."""

# Copyright New York University and the TUF contributors
# Copyright 2022-2024, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

"""Script for generating new metadata files."""

from __future__ import annotations

import os
Expand Down
2 changes: 1 addition & 1 deletion tests/test_metadata_eq_.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright New York University and the TUF contributors
# Copyright 2022-2025, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

"""Test __eq__ implementations of classes inside tuf/api/metadata.py."""
Expand Down
6 changes: 3 additions & 3 deletions tests/test_metadata_generation.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Unit tests for 'tests/generated_data/generate_md.py'."""

# Copyright New York University and the TUF contributors
# Copyright 2022-2024, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

"""Unit tests for 'tests/generated_data/generate_md.py'."""

import sys
import unittest

Expand Down
2 changes: 1 addition & 1 deletion tests/test_metadata_serialization.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright New York University and the TUF contributors
# Copyright 2021-2024, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

"""Unit tests testing tuf/api/metadata.py classes
Expand Down
3 changes: 3 additions & 0 deletions tests/test_trusted_metadata_set.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2021-2026, the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

"""Unit tests for 'tuf/ngclient/_internal/trusted_metadata_set.py'."""

from __future__ import annotations
Expand Down
2 changes: 1 addition & 1 deletion tuf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright New York University and the TUF contributors
# Copyright 2013-2026, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

"""TUF."""
Expand Down
2 changes: 2 additions & 0 deletions tuf/api/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright 2013-2020, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0
8 changes: 4 additions & 4 deletions tuf/api/_payload.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright the TUF contributors
# Copyright 2020-2026, the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0


Expand Down Expand Up @@ -530,7 +530,7 @@ class Root(Signed, _DelegatorMixin):

type = _ROOT

def __init__(
def __init__( # noqa: PLR0917
self,
version: int | None = None,
spec_version: str | None = None,
Expand Down Expand Up @@ -1089,7 +1089,7 @@ class DelegatedRole(Role):
ValueError: Invalid arguments.
"""

def __init__(
def __init__( # noqa: PLR0917
self,
name: str,
keyids: list[str],
Expand Down Expand Up @@ -1710,7 +1710,7 @@ class Targets(Signed, _DelegatorMixin):

type = _TARGETS

def __init__(
def __init__( # noqa: PLR0917
self,
version: int | None = None,
spec_version: str | None = None,
Expand Down
3 changes: 3 additions & 0 deletions tuf/api/dsse.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright 2023-2025, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

"""Low-level TUF DSSE API. (experimental!)"""

from __future__ import annotations
Expand Down
2 changes: 1 addition & 1 deletion tuf/api/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright New York University and the TUF contributors
# Copyright 2021-2025, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

"""
Expand Down
2 changes: 1 addition & 1 deletion tuf/api/metadata.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright New York University and the TUF contributors
# Copyright 2020-2025, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

"""The low-level Metadata API.
Expand Down
2 changes: 1 addition & 1 deletion tuf/api/serialization/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright New York University and the TUF contributors
# Copyright 2021-2024, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

"""``tuf.api.serialization`` module provides abstract base classes and concrete
Expand Down
2 changes: 1 addition & 1 deletion tuf/api/serialization/json.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright New York University and the TUF contributors
# Copyright 2021-2025, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

"""``tuf.api.serialization.json`` module provides concrete implementations to
Expand Down
2 changes: 1 addition & 1 deletion tuf/ngclient/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright New York University and the TUF contributors
# Copyright 2021-2025, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

"""TUF client public API."""
Expand Down
2 changes: 2 additions & 0 deletions tuf/ngclient/_internal/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright 2013-2021, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0
2 changes: 1 addition & 1 deletion tuf/ngclient/_internal/proxy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright New York University and the TUF contributors
# Copyright 2025, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

"""Proxy environment variable handling with Urllib3"""
Expand Down
2 changes: 1 addition & 1 deletion tuf/ngclient/_internal/trusted_metadata_set.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright the TUF contributors
# Copyright 2021-2026, the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

"""Trusted collection of client-side TUF Metadata.
Expand Down
2 changes: 1 addition & 1 deletion tuf/ngclient/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class Updater:
RepositoryError: Local root.json is invalid
"""

def __init__(
def __init__( # noqa: PLR0917
self,
metadata_dir: str,
metadata_base_url: str,
Expand Down
Loading