Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ repos:
- id: python-use-type-annotations
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/hadialqattan/pycln
rev: v1.2.5
hooks:
- id: pycln
args: [--all]
- repo: https://github.com/psf/black
rev: 22.1.0
hooks:
Expand Down
2 changes: 1 addition & 1 deletion examples/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import os.path
import sys
from concurrent.futures import as_completed, ThreadPoolExecutor
from concurrent.futures import ThreadPoolExecutor
import signal
from functools import partial
from threading import Event
Expand Down
1 change: 0 additions & 1 deletion rich/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import os
from typing import Callable, IO, TYPE_CHECKING, Any, Optional, Union

from ._extension import load_ipython_extension

__all__ = ["get_console", "reconfigure", "print", "inspect"]

Expand Down
2 changes: 1 addition & 1 deletion rich/_win32_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
import ctypes
import sys
from typing import IO, Any, NamedTuple, Type, cast
from typing import Any, NamedTuple, Type, cast

windll: Any = None
if sys.platform == "win32":
Expand Down
2 changes: 1 addition & 1 deletion rich/_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class WindowsConsoleFeatures:

try:
import ctypes
from ctypes import LibraryLoader, wintypes
from ctypes import LibraryLoader

if sys.platform == "win32":
windll = LibraryLoader(ctypes.WinDLL)
Expand Down
2 changes: 1 addition & 1 deletion rich/control.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Callable, Dict, Iterable, List, TYPE_CHECKING, Union
from typing import Callable, Dict, Iterable, List, TYPE_CHECKING, Union

from .segment import ControlCode, ControlType, Segment

Expand Down
1 change: 0 additions & 1 deletion rich/highlighter.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import re
import string
from abc import ABC, abstractmethod
from typing import List, Union

Expand Down
2 changes: 1 addition & 1 deletion rich/pager.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from abc import ABC, abstractmethod
from typing import Any, Callable
from typing import Any


class Pager(ABC):
Expand Down
2 changes: 1 addition & 1 deletion rich/protocol.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Callable, cast, Set, TYPE_CHECKING
from typing import Any, cast, Set, TYPE_CHECKING
from inspect import isclass

if TYPE_CHECKING:
Expand Down
2 changes: 1 addition & 1 deletion rich/traceback.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from pygments.token import Token

from . import pretty
from ._loop import loop_first, loop_last
from ._loop import loop_last
from .columns import Columns
from .console import Console, ConsoleOptions, ConsoleRenderable, RenderResult, group
from .constrain import Constrain
Expand Down
2 changes: 0 additions & 2 deletions tests/test_ansi.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import io

from rich.ansi import AnsiDecoder
from rich.console import Console
from rich.style import Style
Expand Down
1 change: 0 additions & 1 deletion tests/test_live.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# encoding=utf-8
import io
import time
from typing import Optional

Expand Down
1 change: 0 additions & 1 deletion tests/test_lrucache.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import unicode_literals

import unittest

from rich._lru_cache import LRUCache

Expand Down
1 change: 0 additions & 1 deletion tests/test_panel.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import io
from rich.console import Console
from rich.measure import Measurement
from rich.panel import Panel

import pytest
Expand Down
1 change: 0 additions & 1 deletion tests/test_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import pytest

from rich import box, errors
from rich.align import VerticalAlignMethod
from rich.console import Console
from rich.measure import Measurement
from rich.style import Style
Expand Down
2 changes: 0 additions & 2 deletions tools/make_emoji.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from unicodedata import normalize

try:
import emoji
except ImportError:
Expand Down