Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from typing import Dict, AnyStr, TypeVar, NamedTuple
- ReqResponse = TypeVar('ReqResponse', Dict, AnyStr)
- UrlReq = NamedTuple('UrlReq', [
- ('url', str),
- ('key', str),
- ('method', str),
- ('as_json', bool),
- ('raw', bool)
- ])
- # ====================================================
- class BitBucket(object):
- def __init__(
- self,
- options: Dict,
- username: AnyStr=None,
- password: AnyStr=None,
- ) -> None:
- pass
- def __req(
- self,
- url: AnyStr,
- method: AnyStr='GET',
- as_json: bool=True,
- raw: bool=False,
- timeout: Union[float, tuple]=(5.00, 20.00), # tuple(connect, read) timeout
- **params
- ) -> ReqResponse:
- pass
- def __do_reqs(
- self,
- urls: Sequence[UrlReq],
- new_binding_key: AnyStr,
- binding_attribute: Dict,
- bind_errors: bool=False,
- ) -> Dict:
- pass
- @property
- def user(self) -> Dict:
- return self.__req('/user')
- @property
- def repositories(self) -> Dict:
- if self._repositories is None:
- self._repositories = self.get_repositories()
- return self._repositories
- def get_repositories(
- self,
- with_readme: bool=True
- ) -> Dict:
- # ====================================================
- from typing import Iterable, Dict, AnyStr, Tuple
- def has_graph_subsection(data: AnyStr=''):
- pass
- def make_graph(
- repos: Iterable[Dict]=None,
- graphviz_kwargs: Dict=None,
- graphviz_attrs: Dict=None,
- flat_text: Tuple[AnyStr, AnyStr]=None
- ):
- pass
- # ====================================================
- from typing import List
- def settings_with_precidence(modules: List=None, overwrite: bool=True):
- pass
Advertisement
Add Comment
Please, Sign In to add comment