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

chore(deps): update ruff to v0.8.0 #874

Merged
merged 3 commits into from
Nov 25, 2024
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
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# Fetch all tags
fetch-depth: 0
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
archs: AMD64

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# Fetch all tags
fetch-depth: 0
Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:
# build: ""

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# Fetch all tags
fetch-depth: 0
Expand Down Expand Up @@ -226,7 +226,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# Fetch all tags
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

steps:
- name: Checkout Code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Synchronize labels
uses: EndBug/label-sync@52074158190acb45f3077f9099fea818aa43f97a # v2
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
experimental: true

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true

Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:
python-version: '3.9'

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true

Expand Down Expand Up @@ -206,7 +206,7 @@ jobs:
PACT_BROKER_DATABASE_URL: sqlite:////tmp/pact_broker.sqlite

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up uv
uses: astral-sh/setup-uv@e779db74266a80753577425b0f4ee823649f251d # v3.2.3
Expand Down Expand Up @@ -250,7 +250,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up uv
uses: astral-sh/setup-uv@e779db74266a80753577425b0f4ee823649f251d # v3.2.3
Expand All @@ -275,7 +275,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up uv
uses: astral-sh/setup-uv@e779db74266a80753577425b0f4ee823649f251d # v3.2.3
Expand All @@ -300,7 +300,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up uv
uses: astral-sh/setup-uv@e779db74266a80753577425b0f4ee823649f251d # v3.2.3
Expand All @@ -325,18 +325,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Spell Check Repo
uses: crate-ci/typos@main
- name: Spell Check Repo https://github.com/crate-ci/typos/commit/
uses: crate-ci/typos@b74202f74b4346efdbce7801d187ec57b266bac8 # v1.27.3

pre-commit:
name: Pre-commit

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Run pre-commit
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ repos:
- '@biomejs/[email protected]'

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.4
rev: v0.8.0
hooks:
- id: ruff
# Exclude python files in pact/** and tests/**, except for the
Expand Down
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ devel-test = [
"pytest-cov ~=6.0",
"testcontainers ~=4.0",
]
devel = ["pact-python[devel-types,devel-docs,devel-test]", "ruff==0.7.4"]
devel = ["pact-python[devel-types,devel-docs,devel-test]", "ruff==0.8.0"]

################################################################################
## Hatch Build Configuration
Expand Down Expand Up @@ -276,8 +276,6 @@ ignore = [
"D200", # Require single line docstrings to be on one line.
"D203", # Require blank line before class docstring
"D212", # Multi-line docstring summary must start at the first line
"ANN101", # `self` must be typed
"ANN102", # `cls` must be typed
"FIX002", # Forbid TODO in comments
"TD002", # Assign someone to 'TODO' comments

Expand Down
24 changes: 12 additions & 12 deletions src/pact/v3/generate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,25 @@
#
# <https://github.com/pact-foundation/pact-reference/blob/303073c/rust/pact_models/src/generators/mod.rs#L121>
__all__ = [
"int",
"integer",
"float",
"Generator",
"bool",
"boolean",
"date",
"datetime",
"decimal",
"float",
"hex",
"hexadecimal",
"int",
"integer",
"mock_server_url",
"provider_state",
"regex",
"str",
"string",
"regex",
"uuid",
"date",
"time",
"datetime",
"timestamp",
"bool",
"boolean",
"provider_state",
"mock_server_url",
"Generator",
"uuid",
]

# We prevent users from importing from this module to avoid shadowing built-ins.
Expand Down
4 changes: 2 additions & 2 deletions src/pact/v3/interaction/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@
from pact.v3.interaction._sync_message_interaction import SyncMessageInteraction

__all__ = [
"Interaction",
"HttpInteraction",
"AsyncMessageInteraction",
"HttpInteraction",
"Interaction",
"SyncMessageInteraction",
]
34 changes: 17 additions & 17 deletions src/pact/v3/match/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,31 +82,31 @@
#
# <https://github.com/pact-foundation/pact-reference/blob/303073c/rust/pact_models/src/matchingrules/mod.rs#L62>
__all__ = [
"Matcher",
"array_containing",
"bool",
"boolean",
"date",
"datetime",
"decimal",
"each_key_matches",
"each_like",
"each_value_matches",
"float",
"includes",
"int",
"integer",
"float",
"decimal",
"like",
"none",
"null",
"number",
"regex",
"str",
"string",
"regex",
"uuid",
"bool",
"boolean",
"date",
"time",
"datetime",
"timestamp",
"none",
"null",
"type",
"like",
"each_like",
"includes",
"array_containing",
"each_key_matches",
"each_value_matches",
"Matcher",
"uuid",
]

_T = TypeVar("_T")
Expand Down
4 changes: 2 additions & 2 deletions tests/v3/compatibility_suite/util/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,8 +722,8 @@ def _(
expected = {key: value}
actual = pact_file["interactions"][n - 1]["request"]["headers"]
assert expected.keys() == actual.keys()
for k in expected:
assert expected[k] == actual[k] or [expected[k]] == actual[k]
for k, v in expected.items():
assert v == actual[k] or [v] == actual[k]


def the_nth_interaction_request_content_type_will_be(stacklevel: int = 1) -> None:
Expand Down
Loading