mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 17:34:49 +08:00
Enable ruff PGH003 rule (#11345)
* Enable ruff PGH003 rule * Fix * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -96,8 +96,8 @@ def analyze_text(text: str) -> tuple[dict, dict]:
|
||||
The first dictionary stores the frequency of single character strings.
|
||||
The second dictionary stores the frequency of two character strings.
|
||||
"""
|
||||
single_char_strings = Counter() # type: ignore
|
||||
two_char_strings = Counter() # type: ignore
|
||||
single_char_strings = Counter() # type: ignore[var-annotated]
|
||||
two_char_strings = Counter() # type: ignore[var-annotated]
|
||||
single_char_strings[text[-1]] += 1
|
||||
|
||||
# first case when we have space at start.
|
||||
|
Reference in New Issue
Block a user