Skip to content

Commit

Permalink
refactor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
GLEF1X committed Apr 20, 2021
1 parent 573ef65 commit 294b477
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
5 changes: 1 addition & 4 deletions glQiwiApi/types/qiwi_types/polygon.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
from collections import ItemsView


class Polygon:
""" Polygon class for QiwiMaps class """

Expand All @@ -19,7 +16,7 @@ def __init__(self, lat_lon_pair_nw: tuple, lat_lon_pair_se: tuple):
def dict(self):
return {k: str(double) for k, double in self._get_items()}

def _get_items(self) -> ItemsView:
def _get_items(self):
return self._dict.items()


Expand Down
2 changes: 1 addition & 1 deletion glQiwiApi/types/yoomoney_types/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ def __repr__(self) -> str:
return self.__str__()


class Payment(BaseModel):
class Payment(BaseModel): # lgtm [py/missing-equals #
status: str
"""
Код результата выполнения операции. Возможные значения:
Expand Down
3 changes: 1 addition & 2 deletions glQiwiApi/utils/basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import warnings
from copy import deepcopy
from datetime import datetime
from json import JSONDecodeError

import pytz
from pydantic import ValidationError, BaseModel
Expand Down Expand Up @@ -215,7 +214,7 @@ def to_datetime(string_representation):
{'dt': string_representation}
)
return Parser.parse_raw(parsed).dt
except (ValidationError, JSONDecodeError) as ex:
except (ValidationError, orjson.JSONDecodeError) as ex:
return ex.json(indent=4)


Expand Down

0 comments on commit 294b477

Please sign in to comment.