"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "poetry/console/commands/search.py" between
poetry-1.1.15.tar.gz and poetry-1.2.0.tar.gz

About: Poetry is a tool for dependency management and packaging in Python.

search.py  (poetry-1.1.15):search.py  (poetry-1.2.0)
from cleo import argument from __future__ import annotations
from .command import Command from cleo.helpers import argument
class SearchCommand(Command): from poetry.console.commands.command import Command
class SearchCommand(Command):
name = "search" name = "search"
description = "Searches for packages on remote repositories." description = "Searches for packages on remote repositories."
arguments = [argument("tokens", "The tokens to search for.", multiple=True)] arguments = [argument("tokens", "The tokens to search for.", multiple=True)]
def handle(self): def handle(self) -> int:
from poetry.repositories.pypi_repository import PyPiRepository from poetry.repositories.pypi_repository import PyPiRepository
results = PyPiRepository().search(self.argument("tokens")) results = PyPiRepository().search(self.argument("tokens"))
for result in results: for result in results:
self.line("") self.line("")
name = "<info>{}</>".format(result.name) name = f"<info>{result.name}</>"
name += " (<comment>{}</>)".format(result.version) name += f" (<comment>{result.version}</>)"
self.line(name) self.line(name)
if result.description: if result.description:
self.line(" {}".format(result.description)) self.line(f" {result.description}")
return 0
 End of changes. 8 change blocks. 
6 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)