diff --git a/__init__.py b/__init__.py index f40d53e8..43c4ab00 100644 --- a/__init__.py +++ b/__init__.py @@ -1 +1 @@ -__version__='0.6.1' +__version__ = "0.6.1" diff --git a/src/pyconnectwise/clients/automate_client.py b/src/pyconnectwise/clients/automate_client.py index 26ca2046..49b40a15 100644 --- a/src/pyconnectwise/clients/automate_client.py +++ b/src/pyconnectwise/clients/automate_client.py @@ -1,5 +1,5 @@ import typing -from datetime import UTC, datetime +from datetime import datetime, timezone from pyconnectwise.clients.connectwise_client import ConnectWiseClient from pyconnectwise.config import Config @@ -68,7 +68,7 @@ def __init__( self.automate_url: str = automate_url self.username: str = username self.password: str = password - self.token_expiry_time: datetime = datetime.now(tz=UTC) + self.token_expiry_time: datetime = datetime.now(tz=timezone.utc) if config: self.config = config @@ -246,7 +246,7 @@ def _get_access_token(self) -> str: return token def _refresh_access_token_if_necessary(self): # noqa: ANN202 - if datetime.now(tz=UTC) > self.token_expiry_time: + if datetime.now(tz=timezone.utc) > self.token_expiry_time: self.access_token = self._get_access_token() def _get_headers(self) -> dict[str, str]: diff --git a/src/pyconnectwise/clients/connectwise_client.py b/src/pyconnectwise/clients/connectwise_client.py index 2372d5c4..d06f34f6 100644 --- a/src/pyconnectwise/clients/connectwise_client.py +++ b/src/pyconnectwise/clients/connectwise_client.py @@ -71,7 +71,7 @@ def _make_request( # noqa: C901 # I don't like having to cast the params to a dict, but it's the only way I can get mypy to stop complaining about the type. # TypedDicts aren't compatible with the dict type and this is the best way I can think of to handle this. if data: - response = requests.request( # noqa: S113 + response = requests.request( method, url, headers=headers, @@ -80,7 +80,7 @@ def _make_request( # noqa: C901 stream=stream, ) else: - response = requests.request( # noqa: S113 + response = requests.request( method, url, headers=headers, diff --git a/src/pyconnectwise/models/manage/__init__.py b/src/pyconnectwise/models/manage/__init__.py index 3120a454..e92a9ca6 100644 --- a/src/pyconnectwise/models/manage/__init__.py +++ b/src/pyconnectwise/models/manage/__init__.py @@ -9883,7 +9883,9 @@ class Member(ConnectWiseModel): invoice_screen_default_tab_format: Annotated[ Literal["ShowInvoicingTab", "ShowAgreementInvoicingTab"], Field(alias="invoiceScreenDefaultTabFormat") ] - invoice_time_tab_format: Annotated[Literal["SummaryList", "DetailList"] | None, Field(alias="invoiceTimeTabFormat")] = None + invoice_time_tab_format: Annotated[ + Literal["SummaryList", "DetailList"] | None, Field(alias="invoiceTimeTabFormat") + ] = None invoicing_display_options: Annotated[ Literal["RemainOnInvoicingScreen", "ShowRecentInvoices"], Field(alias="invoicingDisplayOptions") ]