Skip to content

Commit 5a780f8

Browse files
committed
update AST , flake8 for python 3.14
1 parent 551d39a commit 5a780f8

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/python/black
5-
rev: 22.8.0
5+
rev: 25.11.0
66
hooks:
77
- id: black
88

99
- repo: https://github.com/sqlalchemyorg/zimports
10-
rev: v0.6.0
10+
rev: v0.7.0
1111
hooks:
1212
- id: zimports
1313

1414
- repo: https://github.com/pycqa/flake8
15-
rev: 5.0.0
15+
rev: 7.3.0
1616
hooks:
1717
- id: flake8
1818
additional_dependencies:

zzzeeksphinx/viewsource.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ def _get_module_docstring(_file):
170170
content = _file.read()
171171
module = ast.parse(content)
172172
for elem in module.body:
173-
if isinstance(elem, ast.Expr) and isinstance(elem.value, ast.Str):
174-
return elem.value.s
173+
if isinstance(elem, ast.Expr) and isinstance(elem.value, ast.Constant):
174+
return elem.value.value
175175
else:
176176
return None
177177

0 commit comments

Comments
 (0)