DB
Size: a a a
DB
N
Retry in 5 seconds
, Retry in 10 seconds
-> Retry in %d seconds
A🚀
MK
MK
Command ['/root/.cache/pypoetry/virtualenvs/biotools-rIcPRUCq-py3.7/bin/pip', 'install', '--no-deps', 'toml==0.10.1'] errored with the following return code 1, and output:
Collecting toml==0.10.1
Could not find a version that satisfies the requirement toml==0.10.1 (from versions: )
No matching distribution found for toml==0.10.1
MK
DB
MK
MK
Б
make_exception
?from contextlib import suppress
from typing import TypeVar, Optional, Generic, Type
T = TypeVar("T", bound=Optional[Exception])
class Foo(Generic[T]):
exception: Type[T]
def make_exception(self) -> T: # Incompatible return value type (got "Union[Exception, Any]", expected "T")
if self.exception is not None:
return self.exception('Exc arg') # Cannot instantiate type "Type[None]"
return None
class NoneFoo(Foo[None]): ...
with suppress(AttributeError):
NoneFoo().make_exception().args # "None" has no attribute "args" (expected)
class MyTypeFoo(Foo[ValueError]): ...
MyTypeFoo().make_exception().args # no error (expected)
Б
A🚀
call(a, b, c,)
ll(чень нравится такое распознавание намерений пользователя
a,
b,
c,
)
о
ED
call(a, b, c,)
ll(чень нравится такое распознавание намерений пользователя
a,
b,
c,
)
о
A🚀
env % black --version
black, version 20.8b1
Б
call(a, b, c,)
ll(чень нравится такое распознавание намерений пользователя
a,
b,
c,
)
о
for i, value in enumerate(things)
for i, value, in enumerate(things):
...
И black это потом форматирует во что-то вродеfor (
i,
value,
) in enumerate(things):
...
E
[[tool.poetry.source]]2. Добавляю зависимость
name = "my"
url = "http://my.source.index.com:8888/"
secondary = true
poetry add my-custom-packageВсё добавляется и устанавливается
[[package]]
category = "main"
description = "My Custom Package"
name = "my-custom-package"
optional = false
python-versions = ">=3.6,<4.0"
version = "0.1.0"
[package.dependencies]
...
[package.source]
reference = "my"
url = "http://my.source.index.com:8888"
my-custom-package = [
{file = "my-custom-package-0.1.0-py3-none-any.whl", hash = "md5:f53661ba6de708c6b603ccda77a8894d"},
{file = "my-custom-package-0.10.tar.gz", hash = "md5:6e3170a14db160b0d20dcaf495f07cc7"},
]
poetry install
ставятся все зависимости, в том числе зависимости моего пакета, но сам пакет не ставится:RuntimeErrorЧто не так то? 🤷♂️
Unable to find installation candidates for my-custom-package (0.1.0)
E
$ rm poetry.lock
$ poetry install
Updating dependencies
Resolving dependencies... (52.6s)
Writing lock file
Package operations: 1 install, 0 updates, 0 removals
• Installing my-custom-package (0.1.0)
Installing the current project: my-project (0.1.0)
E
[package.source]
type = "legacy"
url = "http://my.source.index.com:8888"
reference = "my"
type = "legacy"
.DB