Skip to content

Commit

Permalink
Merge pull request theupdateframework#2580 from theupdateframework/de…
Browse files Browse the repository at this point in the history
…pendabot/pip/test-and-lint-dependencies-c17666fe2e

build(deps): bump the test-and-lint-dependencies group with 1 update
  • Loading branch information
lukpueh authored Mar 12, 2024
2 parents 38f7f06 + 10841c6 commit e1b52e7
Show file tree
Hide file tree
Showing 21 changed files with 28 additions and 33 deletions.
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ The linter in CI/CD will check that new TUF code is formatted with
command line:
::

$ ruff format .
$ tox -e fix
1 change: 1 addition & 0 deletions examples/manual_repo/succinct_hash_bin_delegations.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
NOTE: Metadata files will be written to a 'tmp*'-directory in CWD.
"""

import math
import os
import tempfile
Expand Down
2 changes: 1 addition & 1 deletion requirements/lint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
# 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.2.2
ruff==0.3.0
mypy==1.8.0
2 changes: 1 addition & 1 deletion tests/repository_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright 2021, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

""""Test utility to simulate a repository
"""Test utility to simulate a repository
RepositorySimulator provides methods to modify repository metadata so that it's
easy to "publish" new repository versions with modified metadata, while serving
Expand Down
4 changes: 1 addition & 3 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

# Copyright 2020, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0
""" Unit tests for api/metadata.py
"""
"""Unit tests for api/metadata.py"""

import json
import logging
Expand Down
3 changes: 1 addition & 2 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/usr/bin/env python
# Copyright 2020, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0
""" Unit tests for 'examples' scripts.
"""Unit tests for 'examples' scripts."""

"""
import glob
import os
import shutil
Expand Down
3 changes: 1 addition & 2 deletions tests/test_fetcher_ng.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
# Copyright 2021, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

"""Unit test for RequestsFetcher.
"""
"""Unit test for RequestsFetcher."""

import io
import logging
Expand Down
1 change: 0 additions & 1 deletion tests/test_metadata_eq_.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

"""Test __eq__ implementations of classes inside tuf/api/metadata.py."""


import copy
import os
import sys
Expand Down
1 change: 0 additions & 1 deletion tests/test_metadata_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Copyright New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0


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,7 +1,7 @@
# Copyright New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

""" Unit tests testing tuf/api/metadata.py classes
"""Unit tests testing tuf/api/metadata.py classes
serialization and deserialization.
"""
Expand Down
1 change: 1 addition & 0 deletions tests/test_updater_fetch_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"""Test 'Fetch target' from 'Detailed client workflow' as well as
target files storing/loading from cache.
"""

import os
import sys
import tempfile
Expand Down
3 changes: 1 addition & 2 deletions tests/test_updater_ng.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
# Copyright 2021, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

"""Test Updater class
"""
"""Test Updater class"""

import logging
import os
Expand Down
3 changes: 1 addition & 2 deletions tests/test_updater_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
# Copyright 2022, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

"""Test ngclient Updater validations.
"""
"""Test ngclient Updater validations."""

import os
import sys
Expand Down
7 changes: 7 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ commands =

mypy {[testenv:lint]lint_dirs}

[testenv:fix]
changedir = {toxinidir}
deps = {[testenv:lint]deps}
commands =
ruff check --fix {[testenv:lint]lint_dirs}
ruff format {[testenv:lint]lint_dirs}

[testenv:docs]
deps =
-r{toxinidir}/requirements/docs.txt
Expand Down
3 changes: 1 addition & 2 deletions tuf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Copyright New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

"""TUF.
"""
"""TUF."""

# This value is used in the requests user agent.
__version__ = "3.1.0"
3 changes: 1 addition & 2 deletions tuf/api/_payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
# SPDX-License-Identifier: MIT OR Apache-2.0


"""Helper classes for low-level Metadata API.
"""Helper classes for low-level Metadata API."""

"""
import abc
import fnmatch
import io
Expand Down
3 changes: 1 addition & 2 deletions tuf/api/dsse.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Low-level TUF DSSE API. (experimental!)
"""Low-level TUF DSSE API. (experimental!)"""

"""
import json
from typing import Dict, Generic, Type, cast

Expand Down
7 changes: 4 additions & 3 deletions tuf/api/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@
The above principle means that a ``Metadata`` object represents a single
metadata file, and has a ``signed`` attribute that is an instance of one of the
four top level signed classes (``Root``, ``Timestamp``, ``Snapshot`` and
``Targets``). To make Python type annotations useful ``Metadata`` can be
type constrained: e.g. the signed attribute of ``Metadata[Root]``
four top level signed classes (``Root``, ``Timestamp``, ``Snapshot`` and
``Targets``). To make Python type annotations useful ``Metadata`` can be
type constrained: e.g. the signed attribute of ``Metadata[Root]``
is known to be ``Root``.
Currently Metadata API supports JSON as the file format.
A basic example of repository implementation using the Metadata is available in
`examples/repo_example <https://github.com/theupdateframework/python-tuf/tree/develop/examples/repo_example>`_.
"""

import logging
import tempfile
from typing import Any, Dict, Generic, Optional, Type, cast
Expand Down
4 changes: 1 addition & 3 deletions tuf/ngclient/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Copyright New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

"""TUF client public API.
"""

"""TUF client public API."""

from tuf.api.metadata import TargetFile

Expand Down
3 changes: 1 addition & 2 deletions tuf/ngclient/config.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Copyright 2021, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

"""Configuration options for ``Updater`` class.
"""
"""Configuration options for ``Updater`` class."""

from dataclasses import dataclass
from enum import Flag, unique
Expand Down
3 changes: 1 addition & 2 deletions tuf/ngclient/fetcher.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Copyright 2021, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0

"""Provides an interface for network IO abstraction.
"""
"""Provides an interface for network IO abstraction."""

# Imports
import abc
Expand Down

0 comments on commit e1b52e7

Please sign in to comment.