mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
Reflow for linting
This commit is contained in:
@@ -53,8 +53,10 @@ def _infer_annotation_string(context, string, index=None):
|
|||||||
value_set = context.infer_node(node)
|
value_set = context.infer_node(node)
|
||||||
if index is not None:
|
if index is not None:
|
||||||
value_set = value_set.filter(
|
value_set = value_set.filter(
|
||||||
lambda value: value.array_type == 'tuple' # noqa
|
lambda value: (
|
||||||
and len(list(value.py__iter__())) >= index
|
value.array_type == 'tuple'
|
||||||
|
and len(list(value.py__iter__())) >= index
|
||||||
|
)
|
||||||
).py__simple_getitem__(index)
|
).py__simple_getitem__(index)
|
||||||
return value_set
|
return value_set
|
||||||
|
|
||||||
|
|||||||
@@ -69,8 +69,11 @@ Adds an opening bracket after a function for completions.
|
|||||||
# ----------------
|
# ----------------
|
||||||
|
|
||||||
if platform.system().lower() == 'windows':
|
if platform.system().lower() == 'windows':
|
||||||
_cache_directory = os.path.join(os.getenv('LOCALAPPDATA') or
|
_cache_directory = os.path.join(
|
||||||
os.path.expanduser('~'), 'Jedi', 'Jedi')
|
os.getenv('LOCALAPPDATA') or os.path.expanduser('~'),
|
||||||
|
'Jedi',
|
||||||
|
'Jedi',
|
||||||
|
)
|
||||||
elif platform.system().lower() == 'darwin':
|
elif platform.system().lower() == 'darwin':
|
||||||
_cache_directory = os.path.join('~', 'Library', 'Caches', 'Jedi')
|
_cache_directory = os.path.join('~', 'Library', 'Caches', 'Jedi')
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user