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