File tree 3 files changed +10
-10
lines changed
3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -12,15 +12,15 @@ exclude: >
12
12
repos :
13
13
14
14
- repo : https://github.com/pre-commit/pre-commit-hooks
15
- rev : v4.3 .0
15
+ rev : v4.4 .0
16
16
hooks :
17
17
- id : check-json
18
18
- id : check-yaml
19
19
- id : end-of-file-fixer
20
20
- id : trailing-whitespace
21
21
22
22
- repo : https://github.com/asottile/pyupgrade
23
- rev : v2.38 .2
23
+ rev : v3.2 .2
24
24
hooks :
25
25
- id : pyupgrade
26
26
args : [--py37-plus]
@@ -31,12 +31,12 @@ repos:
31
31
- id : isort
32
32
33
33
- repo : https://github.com/psf/black
34
- rev : 22.8 .0
34
+ rev : 22.10 .0
35
35
hooks :
36
36
- id : black
37
37
38
38
- repo : https://github.com/PyCQA/flake8
39
- rev : 5 .0.4
39
+ rev : 6 .0.0
40
40
hooks :
41
41
- id : flake8
42
42
additional_dependencies :
45
45
# - flake8-self~=0.2.2
46
46
47
47
- repo : https://github.com/pre-commit/mirrors-mypy
48
- rev : v0.971
48
+ rev : v0.991
49
49
hooks :
50
50
- id : mypy
51
51
args : [--config-file=pyproject.toml]
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ def __init__(self, renderer: DocutilsRenderer):
45
45
46
46
if not hasattr (self .reporter , "get_source_and_line" ):
47
47
# In docutils this is set by `RSTState.runtime_init`
48
- self .reporter .get_source_and_line = lambda l : (self .document ["source" ], l )
48
+ self .reporter .get_source_and_line = lambda li : (self .document ["source" ], li )
49
49
50
50
self .rfc_url = "rfc%d.html"
51
51
@@ -458,7 +458,7 @@ def run(self) -> list[nodes.Element]:
458
458
try :
459
459
self .renderer .document ["source" ] = str (path )
460
460
self .renderer .reporter .source = str (path )
461
- self .renderer .reporter .get_source_and_line = lambda l : (str (path ), l )
461
+ self .renderer .reporter .get_source_and_line = lambda li : (str (path ), li )
462
462
if "relative-images" in self .options :
463
463
self .renderer .md_env ["relative-images" ] = os .path .relpath (
464
464
path .parent , source_dir
Original file line number Diff line number Diff line change @@ -96,8 +96,8 @@ def resolve_myst_ref(
96
96
``[**nested**](reference)``
97
97
98
98
"""
99
- target = node ["reftarget" ] # type: str
100
- results = [] # type : List[Tuple[str, Element]]
99
+ target : str = node ["reftarget" ]
100
+ results : List [Tuple [str , Element ]] = [ ]
101
101
102
102
res_anchor = self ._resolve_anchor (node , refdoc )
103
103
if res_anchor :
@@ -205,7 +205,7 @@ def _resolve_anchor(
205
205
if self .env .config .myst_heading_anchors is None :
206
206
# no target anchors will have been created, so we don't look for them
207
207
return None
208
- target = node ["reftarget" ] # type: str
208
+ target : str = node ["reftarget" ]
209
209
if "#" not in target :
210
210
return None
211
211
# the link may be a heading anchor; we need to first get the relative path
You can’t perform that action at this time.
0 commit comments