apply ruff fixes
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by David Lord · committed by David Lord · parent 3ec3ac5 · Browse files · 4 files·+6 added−7 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+6 added−7 removed
- other:+6 added−7 removed
Provenance
- Commit
ab91b5a- Tree
ce4f01c- Author
David Lord <davidism@gmail.com>- Committer
David Lord <davidism@gmail.com>- Parent
3ec3ac5
4 files changed+6 added−7 removed
modified:src/click/core.py+4 added-4 removed
623 unmodified lines624 return node625 626 def find_object(self, object_type: t.Type[V]) -> t.Optional[V]:627 """Finds the closest object of a given type."""628- node: t.Optional["Context"] = self628+ node: t.Optional[Context] = self629 630 while node is not None:631 if isinstance(node.obj, object_type):632 return node.obj335 unmodified lines968 .. versionadded:: 8.0969 """970 from click.shell_completion import CompletionItem971 972- results: t.List["CompletionItem"] = []972+ results: t.List[CompletionItem] = []973 974 while ctx.parent is not None:975 ctx = ctx.parent976 239 unmodified lines1216 self.callback = callback1217 #: the list of parameters for this command in the order they1218 #: should show up in the help page and execute. Eager parameters1219 #: will automatically be handled before non eager ones.1220- self.params: t.List["Parameter"] = params or []1220+ self.params: t.List[Parameter] = params or []1221 self.help = help1222 self.epilog = epilog1223 self.options_metavar = options_metavar1224 self.short_help = short_help214 unmodified lines1439 .. versionadded:: 8.01440 """1441 from click.shell_completion import CompletionItem1442 1443- results: t.List["CompletionItem"] = []1443+ results: t.List[CompletionItem] = []1444 1445 if incomplete and not incomplete[0].isalnum():1446 for param in self.get_params(ctx):1447 if (1585 unmodified linesmodified:src/click/exceptions.py+1 added-1 removed
56 unmodified lines57 58 def __init__(self, message: str, ctx: t.Optional["Context"] = None) -> None:59 super().__init__(message)60 self.ctx = ctx61- self.cmd: t.Optional["Command"] = self.ctx.command if self.ctx else None61+ self.cmd: t.Optional[Command] = self.ctx.command if self.ctx else None62 63 def show(self, file: t.Optional[t.IO[t.Any]] = None) -> None:64 if file is None:65 file = get_text_stderr()223 unmodified linesmodified:src/click/parser.py+1 added-1 removed
247 unmodified lines248 def __init__(self, rargs: t.List[str]) -> None:249 self.opts: t.Dict[str, t.Any] = {}250 self.largs: t.List[str] = []251 self.rargs = rargs252- self.order: t.List["CoreParameter"] = []252+ self.order: t.List[CoreParameter] = []253 254 255 class OptionParser:256 """The option parser is an internal class that is ultimately used to275 unmodified linesmodified:pyproject.toml-1 removed
90 unmodified lines9192939495959697985 unmodified lines90 unmodified lines "I", # isort "UP", # pyupgrade "W", # pycodestyle warning]ignore-init-module-imports = true
[tool.ruff.lint.isort]force-single-line = trueorder-by-type = false5 unmodified lines