aboutsummaryrefslogtreecommitdiffstats
path: root/devscripts
diff options
context:
space:
mode:
Diffstat (limited to 'devscripts')
-rwxr-xr-xdevscripts/bash-completion.py3
-rwxr-xr-xdevscripts/fish-completion.py6
-rw-r--r--devscripts/generate_aes_testdata.py8
-rwxr-xr-xdevscripts/make_contributing.py1
-rw-r--r--devscripts/make_issue_template.py10
-rw-r--r--devscripts/make_lazy_extractors.py7
-rwxr-xr-xdevscripts/make_readme.py8
-rw-r--r--devscripts/make_supportedsites.py6
-rw-r--r--devscripts/prepare_manpage.py3
-rw-r--r--devscripts/update-version.py8
-rwxr-xr-xdevscripts/zsh-completion.py3
11 files changed, 53 insertions, 10 deletions
diff --git a/devscripts/bash-completion.py b/devscripts/bash-completion.py
index 268e8a2ae..9b4a9d4e2 100755
--- a/devscripts/bash-completion.py
+++ b/devscripts/bash-completion.py
@@ -1,9 +1,12 @@
#!/usr/bin/env python3
+
+# Allow direct execution
import os
import sys
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+
import yt_dlp
BASH_COMPLETION_FILE = "completions/bash/yt-dlp"
diff --git a/devscripts/fish-completion.py b/devscripts/fish-completion.py
index d9c0048e2..5d2f68a48 100755
--- a/devscripts/fish-completion.py
+++ b/devscripts/fish-completion.py
@@ -1,10 +1,14 @@
#!/usr/bin/env python3
-import optparse
+
+# Allow direct execution
import os
import sys
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+
+import optparse
+
import yt_dlp
from yt_dlp.utils import shell_quote
diff --git a/devscripts/generate_aes_testdata.py b/devscripts/generate_aes_testdata.py
index c7d83f1a7..7f3c88bcf 100644
--- a/devscripts/generate_aes_testdata.py
+++ b/devscripts/generate_aes_testdata.py
@@ -1,11 +1,15 @@
#!/usr/bin/env python3
-import codecs
+
+# Allow direct execution
import os
-import subprocess
import sys
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+
+import codecs
+import subprocess
+
from yt_dlp.aes import aes_encrypt, key_expansion
from yt_dlp.utils import intlist_to_bytes
diff --git a/devscripts/make_contributing.py b/devscripts/make_contributing.py
index 2562c4fd7..a06f8a616 100755
--- a/devscripts/make_contributing.py
+++ b/devscripts/make_contributing.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+
import optparse
import re
diff --git a/devscripts/make_issue_template.py b/devscripts/make_issue_template.py
index 5a309008e..54043ef4e 100644
--- a/devscripts/make_issue_template.py
+++ b/devscripts/make_issue_template.py
@@ -1,4 +1,12 @@
#!/usr/bin/env python3
+
+# Allow direct execution
+import os
+import sys
+
+sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+
+
import optparse
@@ -7,7 +15,7 @@ def read(fname):
return f.read()
-# Get the version from yt_dlp/version.py without importing the package
+# Get the version without importing the package
def read_version(fname):
exec(compile(read(fname), fname, 'exec'))
return locals()['__version__']
diff --git a/devscripts/make_lazy_extractors.py b/devscripts/make_lazy_extractors.py
index 39d4646d0..785d66a6a 100644
--- a/devscripts/make_lazy_extractors.py
+++ b/devscripts/make_lazy_extractors.py
@@ -1,12 +1,15 @@
#!/usr/bin/env python3
-import optparse
+
+# Allow direct execution
import os
import sys
-from inspect import getsource
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+import optparse
+from inspect import getsource
+
NO_ATTR = object()
STATIC_CLASS_PROPERTIES = ['IE_NAME', 'IE_DESC', 'SEARCH_KEY', '_WORKING', '_NETRC_MACHINE', 'age_limit']
CLASS_METHODS = [
diff --git a/devscripts/make_readme.py b/devscripts/make_readme.py
index 015212aa3..f2e08d7c6 100755
--- a/devscripts/make_readme.py
+++ b/devscripts/make_readme.py
@@ -1,7 +1,11 @@
#!/usr/bin/env python3
-# yt-dlp --help | make_readme.py
-# This must be run in a console of correct width
+"""
+yt-dlp --help | make_readme.py
+This must be run in a console of correct width
+"""
+
+
import functools
import re
import sys
diff --git a/devscripts/make_supportedsites.py b/devscripts/make_supportedsites.py
index d8c53c5e1..e46f7af56 100644
--- a/devscripts/make_supportedsites.py
+++ b/devscripts/make_supportedsites.py
@@ -1,10 +1,14 @@
#!/usr/bin/env python3
-import optparse
+
+# Allow direct execution
import os
import sys
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+
+import optparse
+
from yt_dlp.extractor import list_extractor_classes
diff --git a/devscripts/prepare_manpage.py b/devscripts/prepare_manpage.py
index 91e9ebced..cea934949 100644
--- a/devscripts/prepare_manpage.py
+++ b/devscripts/prepare_manpage.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python3
+
import optparse
import os.path
import re
@@ -23,7 +24,7 @@ yt\-dlp \- A youtube-dl fork with additional features and patches
def main():
parser = optparse.OptionParser(usage='%prog OUTFILE.md')
- options, args = parser.parse_args()
+ _, args = parser.parse_args()
if len(args) != 1:
parser.error('Expected an output filename')
diff --git a/devscripts/update-version.py b/devscripts/update-version.py
index 991cfb2af..c5bc83de9 100644
--- a/devscripts/update-version.py
+++ b/devscripts/update-version.py
@@ -1,4 +1,12 @@
#!/usr/bin/env python3
+
+# Allow direct execution
+import os
+import sys
+
+sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+
+
import subprocess
import sys
from datetime import datetime
diff --git a/devscripts/zsh-completion.py b/devscripts/zsh-completion.py
index 59faea06a..267af5f6e 100755
--- a/devscripts/zsh-completion.py
+++ b/devscripts/zsh-completion.py
@@ -1,9 +1,12 @@
#!/usr/bin/env python3
+
+# Allow direct execution
import os
import sys
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+
import yt_dlp
ZSH_COMPLETION_FILE = "completions/zsh/_yt-dlp"