Skip to content

Commit

Permalink
Define public interfaces on the package level
Browse files Browse the repository at this point in the history
  • Loading branch information
vyahello committed Apr 26, 2020
1 parent 7a221ad commit 6f97d01
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 deletions.
14 changes: 7 additions & 7 deletions analyse-source-code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
PACKAGE="urequest"


--entry-point-box() {
entry-point-box() {
:<<DOC
Provides pretty-printer check box
DOC
Expand All @@ -23,47 +23,47 @@ check-black() {
:<<DOC
Runs "black" code analyser
DOC
--entry-point-box "black" && ( black --check ${PACKAGE} )
entry-point-box "black" && ( black --check ${PACKAGE} )
}


check-flake() {
:<<DOC
Runs "flake8" code analysers
DOC
--entry-point-box "flake" && ( flake8 ./ )
entry-point-box "flake" && ( flake8 ./ )
}


check-pylint() {
:<<DOC
Runs "pylint" code analyser
DOC
--entry-point-box "pylint" && ( pylint $(find "${PACKAGE}/") )
entry-point-box "pylint" && ( pylint $(find "${PACKAGE}/") )
}


check-mypy() {
:<<DOC
Runs "mypy" code analyser
DOC
--entry-point-box "mypy" && ( mypy --package "${PACKAGE}" )
entry-point-box "mypy" && ( mypy --package "${PACKAGE}" )
}


check-docstrings() {
:<<DOC
Runs "pydocstyle" static documentation code style formatter
DOC
--entry-point-box "pydocstyle" && ( pydocstyle --explain --count ${PACKAGE} )
entry-point-box "pydocstyle" && ( pydocstyle --explain --count ${PACKAGE} )
}


check-unittests() {
:<<DOC
Runs unittests using "pytest" framework
DOC
--entry-point-box "unitests" && pytest
entry-point-box "unitests" && pytest
}


Expand Down
20 changes: 20 additions & 0 deletions urequest/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
"""Provides user-friendly HTTP client with clean objects."""
from typing import Tuple
from urequest.credentials import Credentials
from urequest.response import JsonType, Response, ResponseError, safe_response
from urequest.session import HttpSession, LoggedHttpSession, Session
from urequest.url import Address, HttpUrl, HttpsUrl, Url

__author__: str = "Volodymyr Yahello"
__email__: str = "vyahello@gmail.com"
__version__: str = "0.0.4"
__license__: str = "MIT License"

__all__: Tuple[str, ...] = (
"Credentials",
"Session",
"HttpSession",
"LoggedHttpSession",
"JsonType",
"Response",
"ResponseError",
"safe_response",
"Address",
"HttpUrl",
"HttpsUrl",
"Url",
)

0 comments on commit 6f97d01

Please sign in to comment.