added more docstrings, lint

This commit is contained in:
Akash Mahanty
2021-01-26 11:42:29 +05:30
parent 817c0ee844
commit acebfabc3e
5 changed files with 118 additions and 47 deletions

View File

@@ -79,7 +79,7 @@ def test_all_cdx():
c = 0
for snapshot in snapshots:
c += 1
if c > 30_529: # deafult limit is 10k
if c > 30529: # deafult limit is 10k
break
url = "https://github.com/*"
@@ -89,5 +89,5 @@ def test_all_cdx():
for snapshot in snapshots:
c += 1
if c > 100_529:
if c > 100529:
break

View File

@@ -5,8 +5,7 @@ import random
import string
import argparse
sys.path.append("..")
import waybackpy.cli as cli # noqa: E402
import waybackpy.cli as cli
from waybackpy.wrapper import Url # noqa: E402
from waybackpy.__version__ import __version__

View File

@@ -61,10 +61,10 @@ def test_check_collapses():
def test_check_match_type():
assert None == _check_match_type(None, "url")
assert _check_match_type(None, "url") is None
match_type = "exact"
url = "test_url"
assert None == _check_match_type(match_type, url)
assert _check_match_type(match_type, url) is None
url = "has * in it"
with pytest.raises(WaybackError):
@@ -82,7 +82,7 @@ def test_cleaned_url():
def test_url_check():
good_url = "https://akamhy.github.io"
assert None == _url_check(good_url)
assert _url_check(good_url) is None
bad_url = "https://github-com"
with pytest.raises(URLError):

View File

@@ -1,8 +1,4 @@
import sys
import pytest
import random
import requests
from datetime import datetime
from waybackpy.wrapper import Url