Skip to content

Commit 19c89e7

Browse files
committed
linting
1 parent 9079ba1 commit 19c89e7

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

pyiceberg/catalog/rest/response.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17+
from http import HTTPStatus
1718
from json import JSONDecodeError
1819
from typing import Literal
1920

20-
from http import HTTPStatus
21-
2221
from pydantic import Field, ValidationError
2322
from requests import HTTPError
2423

tests/catalog/test_rest_response.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,22 +113,26 @@ def test_empty_body_falls_back_to_http_status_phrase() -> None:
113113

114114

115115
def test_oauth_error_with_description() -> None:
116-
body = json.dumps({
117-
"error": "invalid_client",
118-
"error_description": "Client authentication failed",
119-
})
116+
body = json.dumps(
117+
{
118+
"error": "invalid_client",
119+
"error_description": "Client authentication failed",
120+
}
121+
)
120122
exc = _make_http_error(401, body=body)
121123

122124
with pytest.raises(OAuthError, match="invalid_client: Client authentication failed"):
123125
_handle_non_200_response(exc, {401: OAuthError})
124126

125127

126128
def test_oauth_error_with_uri() -> None:
127-
body = json.dumps({
128-
"error": "invalid_scope",
129-
"error_description": "scope not allowed",
130-
"error_uri": "https://example.com/help",
131-
})
129+
body = json.dumps(
130+
{
131+
"error": "invalid_scope",
132+
"error_description": "scope not allowed",
133+
"error_uri": "https://example.com/help",
134+
}
135+
)
132136
exc = _make_http_error(400, body=body)
133137

134138
with pytest.raises(OAuthError, match=r"invalid_scope: scope not allowed \(https://example.com/help\)"):

0 commit comments

Comments
 (0)