Declare types for BasedirOptions. Fixes several errors.
This commit is contained in:
parent
e9ddcf5911
commit
1248d65778
|
@ -4,6 +4,11 @@ import os, sys, urllib, textwrap
|
|||
import codecs
|
||||
from os.path import join
|
||||
|
||||
try:
|
||||
from typing import Optional, Sequence, List
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
# Python 2 compatibility
|
||||
from future.utils import PY2
|
||||
if PY2:
|
||||
|
@ -64,7 +69,7 @@ class BasedirOptions(BaseOptions):
|
|||
optParameters = [
|
||||
["basedir", "C", None, "Specify which Tahoe base directory should be used. [default: %s]"
|
||||
% quote_local_unicode_path(_default_nodedir)],
|
||||
]
|
||||
] # type: List[Sequence[Optional[str]]]
|
||||
|
||||
def parseArgs(self, basedir=None):
|
||||
# This finds the node-directory option correctly even if we are in a subcommand.
|
||||
|
|
Loading…
Reference in New Issue