##// END OF EJS Templates
pytype: drop the last inline type comment...
marmoute -
r52182:7bd7fcc7 default
parent child Browse files
Show More
@@ -9,6 +9,11 b''
9 9 import errno
10 10 import os
11 11
12 from typing import (
13 List,
14 Tuple,
15 )
16
12 17 from .i18n import _
13 18 from . import (
14 19 encoding,
@@ -107,7 +112,7 b' class config:'
107 112 def sections(self):
108 113 return sorted(self._data.keys())
109 114
110 def items(self, section):
115 def items(self, section: bytes) -> List[Tuple[bytes, bytes]]:
111 116 items = self._data.get(section, {}).items()
112 117 return [(k, v[0]) for (k, v) in items]
113 118
@@ -74,7 +74,7 b' def state(ctx: "context.changectx", ui: '
74 74 to tuple: (source from .hgsub, revision from .hgsubstate, kind
75 75 (key in types dict))
76 76 """
77 p = config.config()
77 p: config.config = config.config()
78 78 repo = ctx.repo()
79 79
80 80 def read(f, sections=None, remap=None):
@@ -143,7 +143,7 b' def state(ctx: "context.changectx", ui: '
143 143 return src
144 144
145 145 state = {}
146 for path, src in p.items(b''): # type: bytes
146 for path, src in p.items(b''):
147 147 kind = b'hg'
148 148 if src.startswith(b'['):
149 149 if b']' not in src:
General Comments 0
You need to be logged in to leave comments. Login now