Skip to content

Commit

Permalink
Satisfy clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
covracer authored and charliermarsh committed Nov 3, 2023
1 parent f16505d commit e8879d5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions scripts/update_ambiguous_characters.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,24 @@ def get_mapping_data() -> dict:

def format_confusables_rs(raw_data: dict[str, list[int]]) -> str:
"""Format the downloaded data into a Rust source file."""
<<<<<<< HEAD
# The input data contains duplicate entries
flattened_items: set[tuple[int, int]] = set()
=======
prelude = """
/// This file is auto-generated by `scripts/update_ambiguous_characters.py`.
use once_cell::sync::Lazy;
use rustc_hash::FxHashMap;
/// Via: <https://github.com/hediet/vscode-unicode-data/blob/main/out/ambiguous.json>
/// See: <https://github.com/microsoft/vscode/blob/095ddabc52b82498ee7f718a34f9dd11d59099a8/src/vs/base/common/strings.ts#L1094>
pub(crate) static CONFUSABLES: Lazy<FxHashMap<u32, u32>> = Lazy::new(|| {
#[allow(clippy::unreadable_literal)]
FxHashMap::from_iter([
""".lstrip()
tuples = []
>>>>>>> a9cbfddd4 (Satisfy clippy)
for _category, items in raw_data.items():
assert len(items) % 2 == 0, "Expected pairs of items"
for i in range(0, len(items), 2):
Expand Down

0 comments on commit e8879d5

Please sign in to comment.