mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 00:14:41 +01:00
chore: upgrade black->21.12b0 and mypy->0.930
This commit is contained in:
parent
0957c2d7eb
commit
df1f215f92
4 changed files with 5 additions and 7 deletions
|
@ -12,12 +12,12 @@ pytest-rerunfailures
|
|||
prompt-toolkit>=3.0
|
||||
pygments>=2.2
|
||||
coverage>=5.3.1
|
||||
black==21.7b0
|
||||
black==21.12b0
|
||||
pre-commit
|
||||
pyte>=0.8.0
|
||||
|
||||
# types related
|
||||
mypy==0.910
|
||||
mypy==0.931
|
||||
types-ujson
|
||||
|
||||
# ensure tests run with the amalgamated (==production) xonsh
|
||||
|
|
|
@ -152,7 +152,8 @@ def try_import(mod: str, only_modules=False) -> tp.List[str]:
|
|||
completions.extend(m_all)
|
||||
|
||||
if m_is_init:
|
||||
completions.extend(module_list(os.path.dirname(m.__file__)))
|
||||
if m.__file__:
|
||||
completions.extend(module_list(os.path.dirname(m.__file__)))
|
||||
completions_set = {c for c in completions if isinstance(c, str)}
|
||||
completions_set.discard("__init__")
|
||||
return list(completions_set)
|
||||
|
|
|
@ -36,7 +36,6 @@ if ON_DARWIN:
|
|||
except ProcessLookupError:
|
||||
pass
|
||||
|
||||
|
||||
elif ON_WINDOWS:
|
||||
pass
|
||||
elif ON_CYGWIN or ON_MSYS:
|
||||
|
@ -52,7 +51,6 @@ elif ON_CYGWIN or ON_MSYS:
|
|||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
else:
|
||||
|
||||
def _send_signal(job, signal):
|
||||
|
@ -107,7 +105,6 @@ if ON_WINDOWS:
|
|||
pass # ignore error if process closed before we got here
|
||||
return wait_for_active_job(last_task=active_task)
|
||||
|
||||
|
||||
else:
|
||||
|
||||
def _continue(job):
|
||||
|
|
|
@ -807,7 +807,7 @@ class CompletionContextParser:
|
|||
# obj is multiple commands
|
||||
return self.expand_commands_span(cast(Commands, obj), new_span)
|
||||
elif isinstance(obj.value, PythonContext):
|
||||
return self.try_expand_python_context(obj, new_span)
|
||||
return self.try_expand_python_context(obj, new_span) # type: ignore
|
||||
return None
|
||||
|
||||
def expand_command_span(
|
||||
|
|
Loading…
Add table
Reference in a new issue