Skip to content

Commit

Permalink
build: add script metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
phil65 committed Oct 18, 2024
1 parent c7e04d6 commit a1c2112
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 2 deletions.
9 changes: 9 additions & 0 deletions scripts/create_inv_file.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "requests",
# "sphinx",
# "pyside6"
# ]
# ///

import codecs
import pathlib
import re
Expand Down
8 changes: 8 additions & 0 deletions scripts/create_screenshots.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "prettyqt",
# "pyside6"
# ]
# ///

import inspect
import pathlib

Expand Down
11 changes: 11 additions & 0 deletions scripts/download_docs.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "prettyqt",
# "pyside6",
# "bs4",
# "requests"
# ]
# ///


import inspect
import logging
import pathlib
Expand Down
8 changes: 8 additions & 0 deletions scripts/download_lang_files.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "bs4",
# "requests"
# ]
# ///

import collections
import os
import pathlib
Expand Down
11 changes: 9 additions & 2 deletions scripts/module_stats.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
from __future__ import annotations
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "prettyqt",
# "pyside6",
# ]
# ///

import importlib
import pkgutil
import types
from typing import Self

import PyQt6
import PySide6
Expand Down Expand Up @@ -40,7 +47,7 @@ def list_modules(self, force_qt_naming=False):
def import_modules(self):
return [importlib.import_module(p) for p in self.list_modules()]

def compare_with(self, other: API):
def compare_with(self, other: Self):
theirs = dir(other.module)
ours = dir(self.module)
print(f"Missing modules for {self.module.__name__}")
Expand Down
7 changes: 7 additions & 0 deletions scripts/parse_pyi.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "typed_ast",
# ]
# ///

import pathlib
import sys

Expand Down
8 changes: 8 additions & 0 deletions scripts/print_repr.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "prettyqt",
# "pyside6",
# ]
# ///

import inspect

from prettyqt import gui
Expand Down
4 changes: 4 additions & 0 deletions scripts/replace.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# /// script
# requires-python = ">=3.11"
# ///

import pathlib
import re
import sys
Expand Down

0 comments on commit a1c2112

Please sign in to comment.