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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# caches
.DS_Store
Comment thread
FichteFoll marked this conversation as resolved.
__pycache__
.mypy_cache

Expand Down
10 changes: 9 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ build-backend = "hatchling.build"
lint = [
"pydocstyle>=6.3.0",
"ruff>=0.17.1",
"sublime-text-stubs>=1.4200.0",
"sublime-text-stubs>=4200.1",
"typing-extensions>=4.13.2",
Comment thread
FichteFoll marked this conversation as resolved.
]

[tool.hatch.build.targets.sdist]
Expand Down Expand Up @@ -59,3 +60,10 @@ exclude = [
]
line-length = 100
target-version = "py38"

[tool.ruff.lint]
extend-select = ["TC"]
Comment thread
FichteFoll marked this conversation as resolved.

[tool.ruff.lint.flake8-type-checking]
# `sublime` and `sublime_plugin` are always available at runtime.
exempt-modules = ["typing", "sublime", "sublime_plugin"]
8 changes: 6 additions & 2 deletions sublime_lib/activity_indicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@
from abc import ABCMeta, abstractmethod
from enum import IntEnum
from threading import Lock
from types import TracebackType
from typing import TYPE_CHECKING
from uuid import uuid4

import sublime
from typing_extensions import Self

from ._util.weak_method import weak_method

if TYPE_CHECKING:
from types import TracebackType

from typing_extensions import Self

__all__ = ["ActivityIndicator"]


Expand Down
6 changes: 4 additions & 2 deletions sublime_lib/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,19 @@
import re
from enum import EnumMeta, IntEnum, IntFlag
from inspect import cleandoc, getdoc
from typing import Callable
from typing import TYPE_CHECKING, Callable

import sublime
from typing_extensions import Self

from ._util.enum import (
ExtensibleConstructorMeta,
construct_union,
construct_with_alternatives,
)

if TYPE_CHECKING:
from typing_extensions import Self

__all__ = [
"CompletionOptions",
"DialogResult",
Expand Down
5 changes: 4 additions & 1 deletion sublime_lib/resource_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
import posixpath
from abc import ABCMeta, abstractmethod
from collections import OrderedDict
from collections.abc import Iterable
from pathlib import Path
from typing import TYPE_CHECKING

import sublime

from ._util.glob import get_glob_matcher

if TYPE_CHECKING:
from collections.abc import Iterable

__all__ = ["ResourcePath"]


Expand Down
6 changes: 4 additions & 2 deletions sublime_lib/view_stream.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
from __future__ import annotations

from collections.abc import Generator
from contextlib import contextmanager
from io import SEEK_CUR, SEEK_END, SEEK_SET
from typing import Any, TextIO
from typing import TYPE_CHECKING, Any, TextIO

import sublime
from sublime import Region

from ._util.guard import define_guard

if TYPE_CHECKING:
from collections.abc import Generator


@define_guard
@contextmanager
Expand Down
40 changes: 35 additions & 5 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading