Skip to content

Commit e811e6c

Browse files
committed
fix: support for python3.6
- added typing_extensions as requirement - add tox config
1 parent 4740eb6 commit e811e6c

File tree

7 files changed

+21
-7
lines changed

7 files changed

+21
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ dist/
55
.vscode
66
docs/_build/
77
docs/source/_build
8+
.tox

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include requirements.txt

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
requests
2+
typing_extensions

scrapetube/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from .scrapetube import get_channel, get_search, get_playlist
22

3-
__version__ = '2.2.1'
3+
__version__ = "2.2.1"

scrapetube/scrapetube.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
from typing import Generator, Literal
2-
import requests
31
import json
42
import time
3+
from typing import Generator
4+
5+
import requests
6+
from typing_extensions import Literal
57

68

79
def get_channel(

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from setuptools import setup
2-
from scrapetube import __version__
3-
4-
2+
import re
53

4+
with open("scrapetube/__init__.py", encoding="utf-8") as f:
5+
version = re.findall(r"__version__ = \"(.+)\"", f.read())[0]
66

77
with open('README.md', encoding='utf-8') as f:
88
readme = f.read()
@@ -12,7 +12,7 @@
1212

1313
setup(
1414
name = 'scrapetube',
15-
version = __version__,
15+
version = version,
1616
packages = ['scrapetube'],
1717
include_package_data = True,
1818
url = 'https://github.com/dermasmid/scrapetube',

tox.ini

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[tox]
2+
envlist = py36,py38
3+
4+
[testenv]
5+
6+
deps = -r{toxinidir}/requirements.txt
7+
8+
commands =
9+
python tests/test.py

0 commit comments

Comments
 (0)