Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#250)
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>
  • Loading branch information
pre-commit-ci[bot] authored Jan 10, 2024
1 parent a2399dc commit 2d370be
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 85 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ repos:
- id: check-docstring-first

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.11.0
rev: 23.12.1
hooks:
- id: black

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6
rev: v0.1.11
hooks:
- id: ruff
154 changes: 71 additions & 83 deletions tests/test_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -907,20 +907,18 @@ def test_exporter_can_export_requirements_txt_with_git_packages(
tmp_path: Path, poetry: Poetry
) -> None:
poetry.locker.mock_lock_data({ # type: ignore[attr-defined]
"package": [
{
"name": "foo",
"version": "1.2.3",
"optional": False,
"python-versions": "*",
"source": {
"type": "git",
"url": "https://github.com/foo/foo.git",
"reference": "123456",
"resolved_reference": "abcdef",
},
}
],
"package": [{
"name": "foo",
"version": "1.2.3",
"optional": False,
"python-versions": "*",
"source": {
"type": "git",
"url": "https://github.com/foo/foo.git",
"reference": "123456",
"resolved_reference": "abcdef",
},
}],
"metadata": {
"python-versions": "*",
"content-hash": "123456789",
Expand Down Expand Up @@ -1151,21 +1149,19 @@ def test_exporter_can_export_requirements_txt_with_git_packages_and_markers(
tmp_path: Path, poetry: Poetry
) -> None:
poetry.locker.mock_lock_data({ # type: ignore[attr-defined]
"package": [
{
"name": "foo",
"version": "1.2.3",
"optional": False,
"python-versions": "*",
"marker": "python_version < '3.7'",
"source": {
"type": "git",
"url": "https://github.com/foo/foo.git",
"reference": "123456",
"resolved_reference": "abcdef",
},
}
],
"package": [{
"name": "foo",
"version": "1.2.3",
"optional": False,
"python-versions": "*",
"marker": "python_version < '3.7'",
"source": {
"type": "git",
"url": "https://github.com/foo/foo.git",
"reference": "123456",
"resolved_reference": "abcdef",
},
}],
"metadata": {
"python-versions": "*",
"content-hash": "123456789",
Expand All @@ -1191,19 +1187,17 @@ def test_exporter_can_export_requirements_txt_with_directory_packages(
tmp_path: Path, poetry: Poetry, fixture_root_uri: str
) -> None:
poetry.locker.mock_lock_data({ # type: ignore[attr-defined]
"package": [
{
"name": "foo",
"version": "1.2.3",
"optional": False,
"python-versions": "*",
"source": {
"type": "directory",
"url": "sample_project",
"reference": "",
},
}
],
"package": [{
"name": "foo",
"version": "1.2.3",
"optional": False,
"python-versions": "*",
"source": {
"type": "directory",
"url": "sample_project",
"reference": "",
},
}],
"metadata": {
"python-versions": "*",
"content-hash": "123456789",
Expand Down Expand Up @@ -1291,20 +1285,18 @@ def test_exporter_can_export_requirements_txt_with_directory_packages_and_marker
tmp_path: Path, poetry: Poetry, fixture_root_uri: str
) -> None:
poetry.locker.mock_lock_data({ # type: ignore[attr-defined]
"package": [
{
"name": "foo",
"version": "1.2.3",
"optional": False,
"python-versions": "*",
"marker": "python_version < '3.7'",
"source": {
"type": "directory",
"url": "sample_project",
"reference": "",
},
}
],
"package": [{
"name": "foo",
"version": "1.2.3",
"optional": False,
"python-versions": "*",
"marker": "python_version < '3.7'",
"source": {
"type": "directory",
"url": "sample_project",
"reference": "",
},
}],
"metadata": {
"python-versions": "*",
"content-hash": "123456789",
Expand All @@ -1331,19 +1323,17 @@ def test_exporter_can_export_requirements_txt_with_file_packages(
tmp_path: Path, poetry: Poetry, fixture_root_uri: str
) -> None:
poetry.locker.mock_lock_data({ # type: ignore[attr-defined]
"package": [
{
"name": "foo",
"version": "1.2.3",
"optional": False,
"python-versions": "*",
"source": {
"type": "file",
"url": "distributions/demo-0.1.0.tar.gz",
"reference": "",
},
}
],
"package": [{
"name": "foo",
"version": "1.2.3",
"optional": False,
"python-versions": "*",
"source": {
"type": "file",
"url": "distributions/demo-0.1.0.tar.gz",
"reference": "",
},
}],
"metadata": {
"python-versions": "*",
"content-hash": "123456789",
Expand All @@ -1370,20 +1360,18 @@ def test_exporter_can_export_requirements_txt_with_file_packages_and_markers(
tmp_path: Path, poetry: Poetry, fixture_root_uri: str
) -> None:
poetry.locker.mock_lock_data({ # type: ignore[attr-defined]
"package": [
{
"name": "foo",
"version": "1.2.3",
"optional": False,
"python-versions": "*",
"marker": "python_version < '3.7'",
"source": {
"type": "file",
"url": "distributions/demo-0.1.0.tar.gz",
"reference": "",
},
}
],
"package": [{
"name": "foo",
"version": "1.2.3",
"optional": False,
"python-versions": "*",
"marker": "python_version < '3.7'",
"source": {
"type": "file",
"url": "distributions/demo-0.1.0.tar.gz",
"reference": "",
},
}],
"metadata": {
"python-versions": "*",
"content-hash": "123456789",
Expand Down

0 comments on commit 2d370be

Please sign in to comment.