Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 52670:4cb75772818d
pyupgrade: drop the quoting around type annotations
This is the `typing_pep563` fixer in `pyupgrade`. Quoting to delay evaluation
hasn't been necessary since adding `from __future__ import annotations` in
1c5810ce737e.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 06 Jan 2025 00:30:55 -0500 |
parents | e627cc25b6f3 |
children |
comparison
equal
deleted
inserted
replaced
52669:e627cc25b6f3 | 52670:4cb75772818d |
---|---|
322 """ | 322 """ |
323 for other in others: | 323 for other in others: |
324 check_at_most_one_arg(opts, first, other) | 324 check_at_most_one_arg(opts, first, other) |
325 | 325 |
326 | 326 |
327 def resolve_commit_options(ui: "uimod.ui", opts: Dict[str, Any]) -> bool: | 327 def resolve_commit_options(ui: uimod.ui, opts: Dict[str, Any]) -> bool: |
328 """modify commit options dict to handle related options | 328 """modify commit options dict to handle related options |
329 | 329 |
330 The return value indicates that ``rewrite.update-timestamp`` is the reason | 330 The return value indicates that ``rewrite.update-timestamp`` is the reason |
331 the ``date`` option is set. | 331 the ``date`` option is set. |
332 """ | 332 """ |
1145 ctx = repo[None] | 1145 ctx = repo[None] |
1146 for s in sorted(ctx.substate): | 1146 for s in sorted(ctx.substate): |
1147 ctx.sub(s).bailifchanged(hint=hint) | 1147 ctx.sub(s).bailifchanged(hint=hint) |
1148 | 1148 |
1149 | 1149 |
1150 def logmessage(ui: "uimod.ui", opts: Dict[bytes, Any]) -> Optional[bytes]: | 1150 def logmessage(ui: uimod.ui, opts: Dict[bytes, Any]) -> Optional[bytes]: |
1151 """get the log message according to -m and -l option""" | 1151 """get the log message according to -m and -l option""" |
1152 | 1152 |
1153 check_at_most_one_arg(opts, b'message', b'logfile') | 1153 check_at_most_one_arg(opts, b'message', b'logfile') |
1154 | 1154 |
1155 message = cast(Optional[bytes], opts.get(b'message')) | 1155 message = cast(Optional[bytes], opts.get(b'message')) |