From 768b81683ce99eeeddb2432f9ea4b06b041725aa Mon Sep 17 00:00:00 2001 From: RGBCube <78925721+RGBCube@users.noreply.github.com> Date: Sat, 25 Jun 2022 15:53:55 +0300 Subject: [PATCH] Fix typos and __all__s --- github/__init__.py | 1 + github/errors.py | 2 +- github/types/security_and_analysis.py | 9 +++++---- github/utils.py | 1 - 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/github/__init__.py b/github/__init__.py index ca330a4..4acf6f5 100644 --- a/github/__init__.py +++ b/github/__init__.py @@ -32,3 +32,4 @@ __copyright__ = "Copyright (c) 2022-present VarMonke, sudosnok & contributors" from .errors import * from .internals import * from .objects import * +from . import utils diff --git a/github/errors.py b/github/errors.py index 73f7d44..9f0ad1c 100644 --- a/github/errors.py +++ b/github/errors.py @@ -49,5 +49,5 @@ class RatelimitReached(GitHubError): def error_from_request(request: ClientResponse, /) -> BaseHTTPError: - # TODO: Make specific errrors + # TODO: Make specific errors return HTTPError(request) diff --git a/github/types/security_and_analysis.py b/github/types/security_and_analysis.py index cff0709..aaf2417 100644 --- a/github/types/security_and_analysis.py +++ b/github/types/security_and_analysis.py @@ -1,9 +1,10 @@ -from typing import Literal, TypedDict - -from typing_extensions import NotRequired - __all__ = ("SecurtiyAndAnalysis",) +from typing import Literal, TypedDict, TYPE_CHECKING + +if TYPE_CHECKING: + from typing_extensions import NotRequired + class AdvancedSecurity(TypedDict): status: Literal["enabled", "disabled"] diff --git a/github/utils.py b/github/utils.py index a7bf118..a9f33b5 100644 --- a/github/utils.py +++ b/github/utils.py @@ -5,7 +5,6 @@ __all__ = ( "str_to_datetime", "repr_dt", "bytes_to_b64", - "error_from_request", ) from base64 import b64encode