Skip to content

Commit 65e1b35

Browse files
Merge branch 'main' into from_dict_immutable
2 parents c3935f1 + e6f78de commit 65e1b35

File tree

25 files changed

+65
-49
lines changed

25 files changed

+65
-49
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Contains endpoint functions for accessing the API"""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Contains endpoint functions for accessing the API"""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Contains endpoint functions for accessing the API"""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Contains endpoint functions for accessing the API"""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Contains endpoint functions for accessing the API"""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Contains endpoint functions for accessing the API"""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Contains endpoint functions for accessing the API"""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Contains endpoint functions for accessing the API"""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Contains endpoint functions for accessing the API"""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Contains endpoint functions for accessing the API"""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Contains endpoint functions for accessing the API"""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Contains endpoint functions for accessing the API"""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Contains endpoint functions for accessing the API"""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Contains endpoint functions for accessing the API"""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Contains endpoint functions for accessing the API"""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Contains endpoint functions for accessing the API"""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Contains endpoint functions for accessing the API"""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Contains endpoint functions for accessing the API"""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Contains endpoint functions for accessing the API"""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Contains endpoint functions for accessing the API"""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
""" Contains endpoint functions for accessing the API """

pdm.lock

Lines changed: 28 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies = [
1414
"python-dateutil>=2.8.1,<3.0.0",
1515
"httpx>=0.20.0,<0.29.0",
1616
"ruamel.yaml>=0.18.6,<0.19.0",
17-
"ruff>=0.2,<0.10",
17+
"ruff>=0.2,<0.12",
1818
"typing-extensions>=4.8.0,<5.0.0",
1919
]
2020
name = "openapi-python-client"
@@ -95,7 +95,6 @@ dev = [
9595
"types-PyYAML<7.0.0,>=6.0.3",
9696
"types-certifi<2021.10.9,>=2020.0.0",
9797
"types-python-dateutil<3.0.0,>=2.0.0",
98-
"ruamel-yaml-string>=0.1.1",
9998
"syrupy>=4",
10099
]
101100

tests/test___init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,23 @@ def test__run_post_hooks_reports_missing_commands(self, project_with_dir: Projec
4242
assert fake_command_name in error.detail
4343

4444
def test__run_post_hooks_reports_stdout_of_commands_that_error_with_no_stderr(self, project_with_dir):
45-
failing_command = "python -c \"print('a message'); exit(1)\""
45+
failing_command = "python3 -c \"print('a message'); exit(1)\""
4646
project_with_dir.config.post_hooks = [failing_command]
4747
project_with_dir._run_post_hooks()
4848

4949
assert len(project_with_dir.errors) == 1
5050
error = project_with_dir.errors[0]
5151
assert error.level == ErrorLevel.ERROR
52-
assert error.header == "python failed"
52+
assert error.header == "python3 failed"
5353
assert "a message" in error.detail
5454

5555
def test__run_post_hooks_reports_stderr_of_commands_that_error(self, project_with_dir):
56-
failing_command = "python -c \"print('a message'); raise Exception('some exception')\""
56+
failing_command = "python3 -c \"print('a message'); raise Exception('some exception')\""
5757
project_with_dir.config.post_hooks = [failing_command]
5858
project_with_dir._run_post_hooks()
5959

6060
assert len(project_with_dir.errors) == 1
6161
error = project_with_dir.errors[0]
6262
assert error.level == ErrorLevel.ERROR
63-
assert error.header == "python failed"
63+
assert error.header == "python3 failed"
6464
assert "some exception" in error.detail

tests/test_config.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
import json
22
import os
3+
from io import StringIO
34
from pathlib import Path
5+
from typing import Any
46

57
import pytest
6-
from ruamel.yaml import YAML
8+
from ruamel.yaml import YAML as _YAML
79

810
from openapi_python_client.config import ConfigFile
911

12+
13+
class YAML(_YAML):
14+
def dump_to_string(self, data: Any, **kwargs: Any) -> str:
15+
stream = StringIO()
16+
self.dump(data=data, stream=stream, **kwargs)
17+
return stream.getvalue()
18+
19+
1020
yaml = YAML(typ=["safe", "string"])
1121

1222

0 commit comments

Comments
 (0)