[+] fix mypy errors
This commit is contained in:
parent
48ef23aa88
commit
adc3fd0205
@ -6,6 +6,10 @@ mypy_path =
|
|||||||
mypy-stubs/types-debugpy,
|
mypy-stubs/types-debugpy,
|
||||||
python
|
python
|
||||||
|
|
||||||
|
exclude =
|
||||||
|
python/tmp,
|
||||||
|
python/build
|
||||||
|
|
||||||
plugins =
|
plugins =
|
||||||
numpy.typing.mypy_plugin,
|
numpy.typing.mypy_plugin,
|
||||||
pydantic.mypy
|
pydantic.mypy
|
||||||
|
@ -173,8 +173,10 @@ def mypy(argv: list[str]) -> None:
|
|||||||
settings=_mypy.MypySettings(
|
settings=_mypy.MypySettings(
|
||||||
paths=[
|
paths=[
|
||||||
#Settings.settings().project_root / 'dotfiles/.local/bin/commands',
|
#Settings.settings().project_root / 'dotfiles/.local/bin/commands',
|
||||||
Settings.settings().project_root / 'python',
|
Settings.settings().project_root / 'python' / 'm.py',
|
||||||
Settings.settings().project_root / 'deps/com.github.aiortc.aiortc/src',
|
Settings.settings().project_root / 'python' / '_m.py',
|
||||||
|
Settings.settings().project_root / 'python' / 'online',
|
||||||
|
# Settings.settings().project_root / 'deps/com.github.aiortc.aiortc/src',
|
||||||
#Settings.settings().project_root / 'm.py',
|
#Settings.settings().project_root / 'm.py',
|
||||||
],
|
],
|
||||||
max_errors={
|
max_errors={
|
||||||
|
@ -58,12 +58,12 @@ class CLI(abc.ABC):
|
|||||||
self,
|
self,
|
||||||
force: bool,
|
force: bool,
|
||||||
) -> None:
|
) -> None:
|
||||||
for k, o in self.dependencies.items():
|
for k, d in self.dependencies.items():
|
||||||
whl_glob = self.dist_settings.wheel_dir / ('*%s*.whl' % o.name.replace('.', '_'))
|
whl_glob = self.dist_settings.wheel_dir / ('*%s*.whl' % d.name.replace('.', '_'))
|
||||||
if len(glob.glob(
|
if len(glob.glob(
|
||||||
str(whl_glob)
|
str(whl_glob)
|
||||||
)) == 0 or force:
|
)) == 0 or force:
|
||||||
if o.source_path.exists():
|
if d.source_path.exists():
|
||||||
def whl_files_get() -> list[dict[str, Any]]:
|
def whl_files_get() -> list[dict[str, Any]]:
|
||||||
return [
|
return [
|
||||||
dict(
|
dict(
|
||||||
@ -77,17 +77,18 @@ class CLI(abc.ABC):
|
|||||||
|
|
||||||
present_files = whl_files_get()
|
present_files = whl_files_get()
|
||||||
|
|
||||||
if o.mode == 'm':
|
if d.mode == 'm':
|
||||||
if (o.source_path / 'm.py').exists():
|
if (d.source_path / 'm.py').exists():
|
||||||
cmd = [
|
cmd = [
|
||||||
sys.executable,
|
sys.executable,
|
||||||
o.source_path / 'm.py',
|
str(d.source_path / 'm.py'),
|
||||||
'deploy:wheel',
|
'deploy:wheel',
|
||||||
'-o', self.settings.wheel_dir,
|
'-o',
|
||||||
|
str(self.dist_settings.wheel_dir),
|
||||||
]
|
]
|
||||||
|
|
||||||
if not o.args is None:
|
if not d.args is None:
|
||||||
cmd.extend(o.args)
|
cmd.extend(d.args)
|
||||||
|
|
||||||
subprocess.check_call(cmd)
|
subprocess.check_call(cmd)
|
||||||
else:
|
else:
|
||||||
|
@ -104,7 +104,9 @@ def run() -> None:
|
|||||||
str(bootstrap_settings.python_path),
|
str(bootstrap_settings.python_path),
|
||||||
[
|
[
|
||||||
str(bootstrap_settings.python_path),
|
str(bootstrap_settings.python_path),
|
||||||
pathlib.Path(__file__).parent / 'cli.py',
|
str(
|
||||||
|
pathlib.Path(__file__).parent / 'cli.py'
|
||||||
|
),
|
||||||
*sys.argv[1:],
|
*sys.argv[1:],
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user