Skip to content

Commit 1bf5747

Browse files
python 3.13 still works
1 parent b18f626 commit 1bf5747

26 files changed

+293
-273
lines changed

‎.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.4.0
3+
rev: v4.6.0
44
hooks:
55
- id: trailing-whitespace
66
- id: end-of-file-fixer
77
- id: check-yaml
88
- id: check-added-large-files
99
exclude: ^docs/conf.py$
1010
- repo: https://github.com/psf/black
11-
rev: 22.12.0
11+
rev: 24.4.2
1212
hooks:
1313
- id: black
1414
args: [--target-version, py38]

‎poetry.lock

Lines changed: 262 additions & 261 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pydoc_fork/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Generate Python documentation in HTML."""
2+
23
# __all__ = ['help']
34
__author__ = "Ka-Ping Yee <ping@lfw.org>"
45
__date__ = "26 February 2001"

‎pydoc_fork/commands.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
33
All the CLI logic should be handled in __main__.
44
"""
5+
56
import glob
67
import logging
78
import os

‎pydoc_fork/inspector/custom_types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Custom Types so mypy can check the code
33
"""
4+
45
from typing import List
56

67
from typing_extensions import Protocol

‎pydoc_fork/inspector/module_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Module Manipulation
33
"""
4+
45
import builtins
56

67
# noinspection PyProtectedMember

‎pydoc_fork/inspector/path_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Path Manipulation
33
"""
4+
45
import logging
56
import os
67
import sys

‎pydoc_fork/inspector/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Unclassified utils
33
"""
4+
45
import inspect
56
import logging
67
import re

‎pydoc_fork/reporter/format_class.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Roughly a UI component for classes
33
"""
4+
45
import builtins
56
import inspect
67
import sys

‎pydoc_fork/reporter/format_data.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Roughly a UI component for variables and their values
33
"""
4+
45
from typing import List
56

67
from pydoc_fork.inspector.custom_types import TypeLike

‎pydoc_fork/reporter/format_module.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Roughly a UI component for modules
33
"""
4+
45
import inspect
56
import os
67
import pkgutil

‎pydoc_fork/reporter/format_other.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Fallback docs
33
"""
4+
45
from pydoc_fork.inspector.custom_types import TypeLike
56
from pydoc_fork.reporter.formatter_html import html_repr
67

‎pydoc_fork/reporter/format_page.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Roughly page and top level containers
33
"""
4+
45
import inspect
56
import pkgutil
67
from typing import Any, Dict, Optional

‎pydoc_fork/reporter/format_routine.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Roughly a UI component for routines
22
"""
3+
34
import inspect
45
from typing import Any, Dict, Optional
56

‎pydoc_fork/reporter/formatter_html.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Roughly components
33
"""
4+
45
import logging
56
import re
67
import sysconfig

‎pydoc_fork/reporter/html_repr_class.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Class for safely making an HTML representation of a Python object."""
2+
23
import re
34
from reprlib import Repr
45
from typing import Any, cast

‎pydoc_fork/reporter/inline_styles.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Style sheet for hardcoded styles
33
"""
4+
45
REPR_COLOR = "#c040c0" # purple
56
DISABLED_TEXT = "#909090" # grey
67
MODULE_LINK = "" # ffffff" # white

‎pydoc_fork/reporter/jinja_code.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
Jinja setup
33
"""
4+
45
from jinja2 import Environment, PackageLoader, select_autoescape
56

67
JINJA_ENV = Environment(

‎pydoc_fork/reporter/rst_support.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Rst to HTML function
33
Credits: https://stackoverflow.com/a/49047197/33264
44
"""
5+
56
from typing import Any, List
67

78
from docutils import core

‎pydoc_fork/reporter/string_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
String manipulation
33
"""
4+
45
import logging
56
import re
67

‎pydoc_fork/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
44
Also global variables
55
"""
6+
67
import logging
78
import os
89
import pathlib

‎pydoc_original_ref/pydoc311.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ def visiblename(name, all=None, obj=None):
340340
def classify_class_attrs(object):
341341
"""Wrap inspect.classify_class_attrs, with fixup for data descriptors."""
342342
results = []
343-
for (name, kind, cls, value) in inspect.classify_class_attrs(object):
343+
for name, kind, cls, value in inspect.classify_class_attrs(object):
344344
if inspect.isdatadescriptor(value):
345345
kind = "data descriptor"
346346
if isinstance(value, property) and value.fset is None:

‎pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@ classifiers = [
1010
"License :: OSI Approved :: MIT License",
1111
"Operating System :: OS Independent",
1212
"Programming Language :: Python",
13-
"Programming Language :: Python :: 3",
14-
"Programming Language :: Python :: 3.7",
1513
"Programming Language :: Python :: 3.8",
1614
"Programming Language :: Python :: 3.9",
1715
"Programming Language :: Python :: 3.10",
1816
"Programming Language :: Python :: 3.11",
1917
"Programming Language :: Python :: 3.12",
18+
"Programming Language :: Python :: 3.13",
2019
]
2120
include = [
2221
"pydoc_fork/**/*.py",
@@ -48,9 +47,10 @@ python = ">=3.8, <4"
4847
docopt-ng = ">=0.9.0, <1"
4948

5049
# ui
51-
jinja2 = ">=3.1.3, <4"
50+
jinja2 = ">=3.1.4, <4"
5251
markdown = ">=3.5.2, <4"
53-
docutils = ">=0.20.1, <1"
52+
# docutils dropped 3.8 for later versions
53+
docutils = "==0.20.1"
5454

5555
# loads pyproject.toml
5656
tomli = ">=2.0.1, <3"

‎test/module_examples/mod_😘.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
What things can we cope with?
33
"""
4+
45
thing = 1
56
thing2 = "2"
67
thing3 = "😘"

‎test/support/os_helper.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,6 @@ def temp_umask(umask):
579579

580580

581581
class EnvironmentVarGuard(collections.abc.MutableMapping):
582-
583582
"""Class to help protect the environment variable properly. Can be used as
584583
a context manager."""
585584

‎tox.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# content of: tox.ini , put in same dir as setup.py
22
[tox]
33
envlist =
4-
; py36
5-
; py37
64
py38
75
py39
86
py310
97
py311
108
py312
9+
py313
1110

1211
[testenv]
1312
deps =
14-
pytest<=6.1.0
15-
pytest-cov==4.0.0
13+
pytest>6.1.0
14+
pytest-cov>4.0.0
15+
html5lib
1616
commands =
1717
python -c "import test.tox_banner"
1818
py.test test --cov-report term-missing --cov=pydoc_fork

0 commit comments

Comments
 (0)