Skip to content

Commit

Permalink
Merge branch 'xkbcommon:master' into fix-version-script-check-1
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitryAndric authored Jan 10, 2025
2 parents 393a4d7 + d706e64 commit 2171f76
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.5.1
rev: v0.9.0
hooks:
- id: ruff
# ambiguous-variable-name (E741), line-too-long (E501)
Expand Down
5 changes: 2 additions & 3 deletions scripts/perfect_hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,7 @@ def main() -> None:
action="store",
default=76,
type="int",
help="Maximal width of generated list when "
"wrapped. Default width is %default",
help="Maximal width of generated list when wrapped. Default width is %default",
metavar="INT",
)

Expand Down Expand Up @@ -622,7 +621,7 @@ def main() -> None:
"-e",
"--execute",
action="store_true",
help="Execute the generated code within " "the Python interpreter.",
help="Execute the generated code within the Python interpreter.",
)

parser.add_option(
Expand Down
6 changes: 3 additions & 3 deletions scripts/update-message-registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ def parse(cls, raw_version: str) -> Version:
if raw_version == cls.UNKNOWN_VERSION:
raw_version = cls.DEFAULT_VERSION
version = raw_version.split(".")
assert 2 <= len(version) <= 3 and all(
n.isdecimal() for n in version
), raw_version
assert 2 <= len(version) <= 3 and all(n.isdecimal() for n in version), (
raw_version
)
return Version(*map(int, version))


Expand Down
6 changes: 3 additions & 3 deletions scripts/update-unicode.py
Original file line number Diff line number Diff line change
Expand Up @@ -1659,7 +1659,7 @@ def optimize(
f"data_overlap={s.data_overlap}",
f"offsets1={len(s.offsets1)} (uint size: {s.offsets1_int_size})",
f"offsets2={len(s.offsets2)} (uint size: {s.offsets2_int_size})",
f"total={s.total} ({s.total//8})",
f"total={s.total} ({s.total // 8})",
)
print(f"Total: {result.total} ({result.total // 8})")
print("".center(90, "*"))
Expand Down Expand Up @@ -1827,7 +1827,7 @@ def generate(cls, root: Path, write: bool, config: Config) -> None:
@staticmethod
def myHex(n: int, max_hex_length: int) -> str:
return (
f"""{"-" if n < 0 else " "}0x{hex(abs(n))[2:].rjust(max_hex_length, '0')}"""
f"""{"-" if n < 0 else " "}0x{hex(abs(n))[2:].rjust(max_hex_length, "0")}"""
)

@classmethod
Expand Down Expand Up @@ -1959,7 +1959,7 @@ def run(
assert best_solution
for strategy, sol in zip(strategies, results):
print(
f"{strategy.name}: {sol.total} ({sol.total//8})",
f"{strategy.name}: {sol.total} ({sol.total // 8})",
"✨✨✨" if sol is best_solution else "",
)
best_solution.test(config)
Expand Down

0 comments on commit 2171f76

Please sign in to comment.