Skip to content

Commit

Permalink
Minor annotation cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
facelessuser committed Sep 21, 2022
1 parent 70cedf2 commit 9b3c114
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bracex/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
"""
from __future__ import annotations
import itertools
import math
import re
from typing import List, Iterator, Pattern, Optional, Match, Iterable, AnyStr
from typing import Iterator, Pattern, Optional, Match, Iterable, AnyStr
from . import __meta__


Expand All @@ -43,7 +44,7 @@ class ExpansionLimitException(Exception):
"""Brace expansion limit exception."""


def expand(string: AnyStr, keep_escapes: bool = False, limit: int = DEFAULT_LIMIT) -> List[AnyStr]:
def expand(string: AnyStr, keep_escapes: bool = False, limit: int = DEFAULT_LIMIT) -> list[AnyStr]:
"""Expand braces."""

return list(iexpand(string, keep_escapes, limit))
Expand Down Expand Up @@ -134,7 +135,7 @@ def __init__(self, keep_escapes: bool = False, limit: int = DEFAULT_LIMIT) -> No
self.expanding = False
self.keep_escapes = keep_escapes

def update_count_seq(self, count: List[int]) -> None:
def update_count_seq(self, count: list[int]) -> None:
"""Update the count from a list after evaluating a brace sequence and assert if count exceeds the max limit."""

self.count -= sum(count)
Expand Down
1 change: 1 addition & 0 deletions bracex/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
"""
from __future__ import annotations
import argparse
import bracex
from typing import Optional
Expand Down
1 change: 1 addition & 0 deletions bracex/__meta__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Meta related things."""
from __future__ import annotations
from __future__ import unicode_literals
from collections import namedtuple
import re
Expand Down

0 comments on commit 9b3c114

Please sign in to comment.