Akash Mahanty
a2b14fb9a1
added docstrings, added some static type hints and also lint.
2022-02-06 20:44:52 +05:30
eggplants
d8cabdfdb5
Typing ( #128 )
...
* fix: CI yml name
* add: mypy configuraion
* add: type annotation to waybackpy modules
* add: type annotation to test modules
* fix: mypy command
* add: types-requests to dev deps
* fix: disable max-line-length
* fix: move pytest.ini into setup.cfg
* add: urllib3 to deps
* fix: Retry (ref: https://github.com/python/typeshed/issues/6893 )
* fix: f-string
* fix: shorten long lines
* add: staticmethod decorator to no-self-use methods
* fix: str(headers)->headers_str
* fix: error message
* fix: revert "str(headers)->headers_str" and ignore assignment CaseInsensitiveDict with str
* fix: mypy error
2022-02-05 03:23:36 +09:00
eggplants
e61447effd
Format and lint codes and fix packaging ( #125 )
...
* add: configure files (setup.py->setup.py+setup.cfg+pyproject.toml)
* add: __download_url__
* format with black and isort
* fix: flake8 section in setup.cfg
* add: E501 to flake ignore
* fix: metadata.name does not accept attr
* fix: merge __version__.py into __init__.py
* fix: flake8 errors in tests/
* fix: datetime.datetime -> datetime
* fix: banner
* fix: ignore W605 for banner
* fix: way to install deps in CI
* add: versem to setuptools
* fix: drop python<=3.6 (#126 ) from package and CI
2022-02-03 19:13:39 +05:30
Akash Mahanty
c0252edff2
updated tests for availability_api.py and also added max_tries(default value is 3) with delay (sleep) between successive API calls. The dealy actually improves the performace of the availability_api interface.
2022-01-23 15:05:10 +05:30
Akash Mahanty
1bacd73002
created pytest.ini, added test for waybackpy/availability_api.py, new exceptions all of which inherit from the main WaybackError and created requirements-dev.txt
2022-01-23 01:29:07 +05:30
Akash Mahanty
fd5e85420c
waybackpy/availability_api.py : removed unused imports, added doc strings, removed redundant function.
2022-01-21 22:47:44 +05:30
Akash Mahanty
66e16d6d89
define __repr__ for the Availability API class
2022-01-18 20:34:21 +05:30
Akash Mahanty
cc3628ae18
define __str__ for objects of WaybackMachineAvailabilityAPI class, the check for self.JSON ensures that the API was atleast called.
2022-01-16 22:28:12 +05:30
Akash Mahanty
1d751b942b
invoke json, was a bad idea removing it the earlier commit as the end user should not have to call it
2022-01-16 22:15:25 +05:30
Akash Mahanty
261a867a21
near() method of WaybackMachineAvailabilityAPI return self to preserve past behaviour
2022-01-16 21:53:54 +05:30
Akash Mahanty
4e68cd5743
Create separate module for the 3 different APIs also CDX is now CLI supported.
2022-01-02 14:14:45 +05:30