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: update black #153

Closed
wants to merge 2 commits into from
Closed
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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ repos:
- id: check-yaml
- id: debug-statements
- repo: https://github.com/python-poetry/poetry
rev: 1.6.1
rev: 1.8.3
hooks:
- id: poetry-check
- id: poetry-lock
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.7.0
rev: 24.8.0
hooks:
- id: black
language_version: python3.11
Expand Down
156 changes: 79 additions & 77 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ types-requests = "^2.0.0.0"
[tool.poetry.group.dev]
optional = true
[tool.poetry.group.dev.dependencies]
black = ">=22.8,<24.0"
black = ">=22.8"
coverage = "7.2.7"
isort = "^5.10.1"
keepachangelog-manager = ">=3.3.1"
Expand Down
1 change: 1 addition & 0 deletions smile_id_core/BusinessVerification.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
directors, beneficial owners and fiduciaries of a business while
the tax information returns only the company information
"""

from typing import Any, Dict, Union

from smile_id_core.base import Base
Expand Down
1 change: 1 addition & 0 deletions smile_id_core/IdApi.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""ID API class for kyc services."""

from typing import Any, Dict, Optional, Union

from smile_id_core.base import Base
Expand Down
1 change: 1 addition & 0 deletions smile_id_core/ServerError.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""ServerError Class."""

__all__ = ["ServerError"]


Expand Down
1 change: 1 addition & 0 deletions smile_id_core/Signature.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This Signature class creates and validates generated signatures."""

import base64
import hashlib
import hmac
Expand Down
1 change: 1 addition & 0 deletions smile_id_core/Utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Additionally, the Utilities class makes a call to the Signature class and
performs signature parama validation.
"""

import json
import re
import sys
Expand Down
1 change: 1 addition & 0 deletions smile_id_core/WebApi.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""WebAPI allows ID authority/third parties User validation by partners."""

import json
import time
from datetime import datetime
Expand Down
1 change: 1 addition & 0 deletions smile_id_core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Defines and exports all classes used throughout this project."""

from smile_id_core.base import Base
from smile_id_core.BusinessVerification import BusinessVerification
from smile_id_core.constants import ImageTypes, JobType
Expand Down
1 change: 1 addition & 0 deletions smile_id_core/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Constains reusable functions across this repository."""

from typing import Union

from smile_id_core import constants
Expand Down
1 change: 1 addition & 0 deletions smile_id_core/constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains constants used across smile, like image types and job types."""

import typing
from enum import IntEnum

Expand Down
1 change: 1 addition & 0 deletions smile_id_core/image_upload.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Prepare & validate image data, and generate zipped file to be submitted."""

import io
import json
import os
Expand Down
1 change: 1 addition & 0 deletions smile_id_core/types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Define strict typings to paramters used throughout the SmileID SDK."""

import sys
from typing import Union

Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Fixture file to allow for code re-usability and reduce duplication."""

import base64
import json
import os
Expand Down
8 changes: 5 additions & 3 deletions tests/test_business_verification.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test class for Business Verification"""

from datetime import datetime
from typing import Any, Dict, Tuple
from unittest.mock import patch
Expand Down Expand Up @@ -226,9 +227,10 @@ def test_error_return_data(
"""Validate Error retrun data"""
kyb_partner_params["job_type"] = JobType.BUSINESS_VERIFICATION
with pytest.raises(ServerError) as value_error:
with patch("requests.post") as mocked_post, patch(
"requests.get"
) as mocked_get:
with (
patch("requests.post") as mocked_post,
patch("requests.get") as mocked_get,
):
mocked_post.return_value.status_code = 400
mocked_post.return_value.ok = True
mocked_post.return_value.text.return_value = {
Expand Down
1 change: 1 addition & 0 deletions tests/test_constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Unit tests for different constants used across the SmileAPI"""

from smile_id_core.constants import ImageTypes, JobType


Expand Down
8 changes: 5 additions & 3 deletions tests/test_id_api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test class for ID API"""

from datetime import datetime
from typing import Any, Dict, Tuple
from unittest.mock import patch
Expand Down Expand Up @@ -179,9 +180,10 @@ def test_error_return_data(
kyc_id_info,
)
with pytest.raises(ServerError) as value_error:
with patch("requests.post") as mocked_post, patch(
"requests.get"
) as mocked_get:
with (
patch("requests.post") as mocked_post,
patch("requests.get") as mocked_get,
):
mocked_post.return_value.status_code = 400
mocked_post.return_value.ok = True
mocked_post.return_value.text.return_value = {
Expand Down
1 change: 1 addition & 0 deletions tests/test_signature.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test class for the SIgnature class"""

import base64
import hashlib
import hmac
Expand Down
1 change: 1 addition & 0 deletions tests/test_utilities.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test class of Utilities"""

import re
import uuid
from datetime import datetime, timedelta
Expand Down
1 change: 1 addition & 0 deletions tests/test_web_api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Test class for Web API"""

import os
from datetime import datetime, timedelta
from typing import Any, Dict, List, Tuple
Expand Down
Loading