Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tmux-python/libtmux
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.40.1
Choose a base ref
...
head repository: tmux-python/libtmux
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.41.0
Choose a head ref

Commits on Dec 25, 2024

  1. py(deps) Bump dev packages

    tony committed Dec 25, 2024
    Copy the full SHA
    cadc58f View commit details

Commits on Dec 27, 2024

  1. py(deps) Bump dev packages

    tony committed Dec 27, 2024
    Copy the full SHA
    fc3ab36 View commit details

Commits on Dec 28, 2024

  1. py(deps) Bump dev packages

    tony committed Dec 28, 2024
    Copy the full SHA
    03d3056 View commit details

Commits on Dec 31, 2024

  1. py(deps) Bump dev packages

    tony committed Dec 31, 2024
    Copy the full SHA
    c2108ab View commit details

Commits on Jan 2, 2025

  1. py(deps) Bump dev packages

    tony committed Jan 2, 2025
    Copy the full SHA
    daa03ec View commit details

Commits on Jan 4, 2025

  1. py(deps) Bump dev packages

    tony committed Jan 4, 2025
    Copy the full SHA
    3fcb49a View commit details
  2. chore(ruff) Automated fixes for typing annotations

    Fixed 21 errors:
    - src/libtmux/_internal/query_list.py:
        2 × UP006 (non-pep585-annotation)
        1 × I001 (unsorted-imports)
    - src/libtmux/common.py:
        1 × I001 (unsorted-imports)
        1 × UP006 (non-pep585-annotation)
    - src/libtmux/neo.py:
        2 × UP006 (non-pep585-annotation)
        1 × I001 (unsorted-imports)
    - src/libtmux/test.py:
        2 × UP006 (non-pep585-annotation)
        1 × I001 (unsorted-imports)
    - tests/_internal/test_query_list.py:
        1 × I001 (unsorted-imports)
        1 × UP006 (non-pep585-annotation)
    - tests/legacy_api/test_version.py:
        2 × I001 (unsorted-imports)
        1 × UP006 (non-pep585-annotation)
        1 × TC003 (typing-only-standard-library-import)
    - tests/test_version.py:
        2 × I001 (unsorted-imports)
        1 × UP006 (non-pep585-annotation)
        1 × TC003 (typing-only-standard-library-import)
    
    Found 1729 errors (21 fixed, 1708 remaining).
    44 files left unchanged
    
    uv run ruff check --select ALL . --fix --unsafe-fixes --preview --show-fixes; uv run ruff format .
    tony committed Jan 4, 2025
    Copy the full SHA
    df8480c View commit details
  3. Copy the full SHA
    03db1da View commit details
  4. Copy the full SHA
    54edeea View commit details
  5. chore(ruff) Automated fixes for typing annotations

    Fixed 606 errors:
    - conftest.py:
          1 × TC003 (typing-only-standard-library-import)
          1 × I002 (missing-required-import)
    - docs/conf.py:
          2 × UP007 (non-pep604-annotation)
          2 × UP037 (quoted-annotation)
          1 × I002 (missing-required-import)
    - src/libtmux/__about__.py:
          1 × I002 (missing-required-import)
    - src/libtmux/__init__.py:
          1 × I002 (missing-required-import)
    - src/libtmux/_internal/dataclasses.py:
          1 × UP037 (quoted-annotation)
          1 × I002 (missing-required-import)
    - src/libtmux/_internal/query_list.py:
         47 × UP037 (quoted-annotation)
         37 × UP007 (non-pep604-annotation)
          1 × I002 (missing-required-import)
    - src/libtmux/_vendor/_structures.py:
          1 × I002 (missing-required-import)
          1 × UP037 (quoted-annotation)
    - src/libtmux/_vendor/version.py:
         12 × UP007 (non-pep604-annotation)
          5 × UP037 (quoted-annotation)
          1 × F401 (unused-import)
          1 × I002 (missing-required-import)
    - src/libtmux/common.py:
          8 × UP007 (non-pep604-annotation)
          2 × F401 (unused-import)
          1 × UP037 (quoted-annotation)
          1 × I002 (missing-required-import)
          1 × TC003 (typing-only-standard-library-import)
    - src/libtmux/constants.py:
          1 × I002 (missing-required-import)
    - src/libtmux/exc.py:
          7 × UP007 (non-pep604-annotation)
          1 × UP037 (quoted-annotation)
          1 × I002 (missing-required-import)
    - src/libtmux/formats.py:
          1 × I002 (missing-required-import)
    - src/libtmux/neo.py:
        129 × UP007 (non-pep604-annotation)
          9 × UP037 (quoted-annotation)
          1 × I002 (missing-required-import)
    - src/libtmux/pane.py:
         55 × UP007 (non-pep604-annotation)
         20 × UP037 (quoted-annotation)
          2 × Q000 (bad-quotes-inline-string)
          1 × I002 (missing-required-import)
    - src/libtmux/pytest_plugin.py:
          1 × UP037 (quoted-annotation)
          1 × TC003 (typing-only-standard-library-import)
          1 × I002 (missing-required-import)
          1 × I001 (unsorted-imports)
    - src/libtmux/server.py:
         23 × UP007 (non-pep604-annotation)
          7 × UP037 (quoted-annotation)
          1 × I002 (missing-required-import)
    - src/libtmux/session.py:
         29 × UP007 (non-pep604-annotation)
         20 × UP037 (quoted-annotation)
          1 × I002 (missing-required-import)
          1 × TC001 (typing-only-first-party-import)
          1 × I001 (unsorted-imports)
    - src/libtmux/test.py:
          7 × UP037 (quoted-annotation)
          5 × UP007 (non-pep604-annotation)
          3 × I001 (unsorted-imports)
          2 × TC003 (typing-only-standard-library-import)
          1 × F401 (unused-import)
          1 × I002 (missing-required-import)
          1 × TC001 (typing-only-first-party-import)
          1 × PYI034 (non-self-return-type)
    - src/libtmux/window.py:
         52 × UP007 (non-pep604-annotation)
         22 × UP037 (quoted-annotation)
          1 × I002 (missing-required-import)
    - tests/_internal/test_query_list.py:
          3 × UP007 (non-pep604-annotation)
          1 × I002 (missing-required-import)
          1 × I001 (unsorted-imports)
          1 × TC003 (typing-only-standard-library-import)
    - tests/legacy_api/test_common.py:
          4 × UP007 (non-pep604-annotation)
          1 × TC001 (typing-only-first-party-import)
          1 × I002 (missing-required-import)
    - tests/legacy_api/test_pane.py:
          1 × I001 (unsorted-imports)
          1 × I002 (missing-required-import)
          1 × TC001 (typing-only-first-party-import)
    - tests/legacy_api/test_server.py:
          1 × I001 (unsorted-imports)
          1 × I002 (missing-required-import)
          1 × TC001 (typing-only-first-party-import)
    - tests/legacy_api/test_session.py:
          1 × I001 (unsorted-imports)
          1 × TC001 (typing-only-first-party-import)
          1 × I002 (missing-required-import)
    - tests/legacy_api/test_tmuxobject.py:
          1 × I001 (unsorted-imports)
          1 × TC001 (typing-only-first-party-import)
          1 × I002 (missing-required-import)
    - tests/legacy_api/test_version.py:
          2 × UP007 (non-pep604-annotation)
          2 × UP037 (quoted-annotation)
          1 × I002 (missing-required-import)
    - tests/legacy_api/test_window.py:
          1 × I001 (unsorted-imports)
          1 × TC001 (typing-only-first-party-import)
          1 × I002 (missing-required-import)
    - tests/test_common.py:
          4 × UP007 (non-pep604-annotation)
          1 × I002 (missing-required-import)
          1 × TC001 (typing-only-first-party-import)
    - tests/test_dataclasses.py:
          1 × TC003 (typing-only-standard-library-import)
          1 × TC001 (typing-only-first-party-import)
          1 × I002 (missing-required-import)
          1 × I001 (unsorted-imports)
    - tests/test_pane.py:
          1 × I001 (unsorted-imports)
          1 × I002 (missing-required-import)
          1 × TC001 (typing-only-first-party-import)
    - tests/test_pytest_plugin.py:
          1 × I001 (unsorted-imports)
          1 × I002 (missing-required-import)
          1 × TC002 (typing-only-third-party-import)
    - tests/test_server.py:
          1 × I001 (unsorted-imports)
          1 × TC001 (typing-only-first-party-import)
          1 × I002 (missing-required-import)
    - tests/test_session.py:
          1 × TC001 (typing-only-first-party-import)
          1 × I002 (missing-required-import)
    - tests/test_test.py:
          1 × I002 (missing-required-import)
    - tests/test_tmuxobject.py:
          1 × I001 (unsorted-imports)
          1 × TC001 (typing-only-first-party-import)
          1 × I002 (missing-required-import)
    - tests/test_version.py:
          2 × UP007 (non-pep604-annotation)
          2 × UP037 (quoted-annotation)
          1 × I002 (missing-required-import)
    - tests/test_window.py:
          1 × I001 (unsorted-imports)
          1 × I002 (missing-required-import)
          1 × TC001 (typing-only-first-party-import)
    
    Found 1976 errors (606 fixed, 1370 remaining).
    35 files reformatted, 9 files left unchanged
    
    uv run ruff check --select ALL . --fix --unsafe-fixes --preview --show-fixes; uv run ruff format .
    tony committed Jan 4, 2025
    Copy the full SHA
    2863201 View commit details
  6. Copy the full SHA
    bb13d70 View commit details
  7. chore(ruff) Automated fixes for typing annotations

    Fixed 6 errors:
    - src/libtmux/_vendor/version.py:
        1 × I001 (unsorted-imports)
        1 × UP006 (non-pep585-annotation)
    - src/libtmux/test.py:
        2 × I001 (unsorted-imports)
        1 × UP006 (non-pep585-annotation)
        1 × TC003 (typing-only-standard-library-import)
    
    Found 1374 errors (6 fixed, 1368 remaining).
    44 files left unchanged
    
    uv run ruff check --select ALL . --fix --unsafe-fixes --preview --show-fixes; uv run ruff format .
    tony committed Jan 4, 2025
    Copy the full SHA
    b76c353 View commit details
  8. Copy the full SHA
    aa5e23f View commit details
  9. chore: Implement PEP 563 deferred annotation resolution (#555)

    - Add `from __future__ import annotations` to defer annotation resolution and reduce unnecessary runtime computations during type checking
    - Enable Ruff checks for PEP-compliant annotations:
      - [non-pep585-annotation (UP006)](https://docs.astral.sh/ruff/rules/non-pep585-annotation/)
      - [non-pep604-annotation (UP007)](https://docs.astral.sh/ruff/rules/non-pep604-annotation/)
    
    For more details on PEP 563, see: https://peps.python.org/pep-0563/
    tony authored Jan 4, 2025
    Copy the full SHA
    c511658 View commit details
  10. py(deps) Bump dev packages

    tony committed Jan 4, 2025
    Copy the full SHA
    ce2dcff View commit details

Commits on Jan 5, 2025

  1. py(deps) Bump dev packages

    tony committed Jan 5, 2025
    Copy the full SHA
    caa938e View commit details

Commits on Jan 9, 2025

  1. py(deps) Bump dev packages

    tony committed Jan 9, 2025
    Copy the full SHA
    92451f8 View commit details
  2. Copy the full SHA
    dc41d3f View commit details
  3. Copy the full SHA
    d70c380 View commit details

Commits on Jan 10, 2025

  1. py(deps) Bump dev packages

    tony committed Jan 10, 2025
    Copy the full SHA
    ca483f3 View commit details

Commits on Jan 12, 2025

  1. Copy the full SHA
    9ebde6a View commit details

Commits on Jan 18, 2025

  1. py(deps) Bump dev packages

    tony committed Jan 18, 2025
    Copy the full SHA
    04802b3 View commit details

Commits on Jan 19, 2025

  1. Copy the full SHA
    5613d58 View commit details
  2. docs: Move redirects/ to api/

    tony committed Jan 19, 2025
    Copy the full SHA
    64dd65c View commit details
  3. Copy the full SHA
    edb4580 View commit details
  4. Copy the full SHA
    1aebbb7 View commit details

Commits on Jan 20, 2025

  1. py(deps) Bump dev packages

    tony committed Jan 20, 2025
    Copy the full SHA
    53d3d98 View commit details

Commits on Jan 22, 2025

  1. py(deps) Bump dev packages

    tony committed Jan 22, 2025
    Copy the full SHA
    742c8c6 View commit details
  2. Copy the full SHA
    f9937ab View commit details

Commits on Jan 25, 2025

  1. py(deps) Bump dev packages

    tony committed Jan 25, 2025
    Copy the full SHA
    f705713 View commit details

Commits on Feb 1, 2025

  1. py(deps) Bump dev packages

    tony committed Feb 1, 2025
    Copy the full SHA
    09fd941 View commit details
  2. Copy the full SHA
    dccbb68 View commit details
  3. Copy the full SHA
    c39717c View commit details
  4. Copy the full SHA
    ead667c View commit details
  5. docs(Server) Fix colors param (#544)

    This PR fixes an incorrect docstring.
    
    For the `color` parameter, the API for libtmux actually expects either `256` or `88`.
    TravisDart authored Feb 1, 2025
    Copy the full SHA
    35f8d8c View commit details
  6. Copy the full SHA
    52a0109 View commit details

Commits on Feb 2, 2025

  1. chore: Fix formatting issue

    src/libtmux/server.py:618:89: E501 Line too long (89 > 88)
        |
    616 |         if self.socket_path is not None:
    617 |             return f"{self.__class__.__name__}(socket_path={self.socket_path})"
    618 |         return f"{self.__class__.__name__}(socket_path=/tmp/tmux-{os.geteuid()}/default)"
        |                                                                                         ^ E501
    619 |
    620 |     #
        |
    
    Found 1 error.
    tony committed Feb 2, 2025
    Copy the full SHA
    7169008 View commit details
  2. py(deps) Bump dev packages

    tony committed Feb 2, 2025
    Copy the full SHA
    48d940a View commit details
  3. Copy the full SHA
    4bb3158 View commit details
Showing with 1,048 additions and 882 deletions.
  1. +1 −1 .github/workflows/tests.yml
  2. +1 −1 .tool-versions
  3. +24 −1 CHANGES
  4. +5 −1 conftest.py
  5. +1 −1 docs/about.md
  6. 0 docs/{reference → api}/common.md
  7. 0 docs/{reference → api}/constants.md
  8. 0 docs/{reference → api}/exceptions.md
  9. 0 docs/{reference → api}/index.md
  10. 0 docs/{reference → api}/panes.md
  11. 0 docs/{reference → api}/properties.md
  12. 0 docs/{reference → api}/servers.md
  13. 0 docs/{reference → api}/sessions.md
  14. 0 docs/{reference → api}/windows.md
  15. +8 −6 docs/conf.py
  16. +1 −1 docs/index.md
  17. +9 −0 docs/redirects.txt
  18. +17 −1 pyproject.toml
  19. +3 −1 src/libtmux/__about__.py
  20. +2 −0 src/libtmux/__init__.py
  21. +3 −1 src/libtmux/_internal/dataclasses.py
  22. +43 −41 src/libtmux/_internal/query_list.py
  23. +2 −1 src/libtmux/_vendor/_structures.py
  24. +26 −23 src/libtmux/_vendor/version.py
  25. +13 −9 src/libtmux/common.py
  26. +2 −0 src/libtmux/constants.py
  27. +10 −8 src/libtmux/exc.py
  28. +2 −0 src/libtmux/formats.py
  29. +140 −137 src/libtmux/neo.py
  30. +66 −65 src/libtmux/pane.py
  31. +5 −2 src/libtmux/pytest_plugin.py
  32. +29 −25 src/libtmux/server.py
  33. +48 −47 src/libtmux/session.py
  34. +19 −15 src/libtmux/test.py
  35. +62 −62 src/libtmux/window.py
  36. +7 −2 tests/_internal/test_query_list.py
  37. +15 −11 tests/legacy_api/test_common.py
  38. +5 −1 tests/legacy_api/test_pane.py
  39. +6 −1 tests/legacy_api/test_server.py
  40. +9 −4 tests/legacy_api/test_session.py
  41. +6 −1 tests/legacy_api/test_tmuxobject.py
  42. +9 −5 tests/legacy_api/test_version.py
  43. +9 −4 tests/legacy_api/test_window.py
  44. +15 −11 tests/test_common.py
  45. +6 −2 tests/test_dataclasses.py
  46. +6 −1 tests/test_pane.py
  47. +5 −1 tests/test_pytest_plugin.py
  48. +6 −1 tests/test_server.py
  49. +11 −7 tests/test_session.py
  50. +2 −0 tests/test_test.py
  51. +6 −1 tests/test_tmuxobject.py
  52. +9 −5 tests/test_version.py
  53. +15 −10 tests/test_window.py
  54. +359 −364 uv.lock
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -69,7 +69,7 @@ jobs:
export PATH=$HOME/tmux-builds/tmux-${{ matrix.tmux-version }}/bin:$PATH
ls $HOME/tmux-builds/tmux-${{ matrix.tmux-version }}/bin
tmux -V
uv run py.test --cov=./ --cov-append --cov-report=xml -n auto
uv run py.test --cov=./ --cov-append --cov-report=xml -n auto --verbose
env:
COV_CORE_SOURCE: .
COV_CORE_CONFIG: .coveragerc
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
uv 0.5.11
uv 0.5.22
python 3.13.1 3.12.8 3.11.11 3.10.16 3.9.21 3.8.20 3.7.17
25 changes: 24 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -9,12 +9,35 @@ To install via [pip](https://pip.pypa.io/en/stable/), use:
$ pip install --user --upgrade --pre libtmux
```

## libtmux 0.41.x (Yet to be released)
## libtmux 0.42.x (Yet to be released)

- _Future release notes will be placed here_

<!-- To maintainers and contributors: Please add notes for the forthcoming version above -->

## libtmux 0.41.0 (2025-02-02)

### Fixes

- {meth}`Server.__repr__()`: Use {meth}`os.geteuid()` for default `socket_path`. Thank you @lazysegtree!
(#557, resolves #556)

### Documentation

- `Server`: Fix `colors` docstring to note it accepts `88` or `256`, Thank you
@TravisDart! (via #544)

### Development

#### chore: Implement PEP 563 deferred annotation resolution (#555)

- Add `from __future__ import annotations` to defer annotation resolution and reduce unnecessary runtime computations during type checking.
- Enable Ruff checks for PEP-compliant annotations:
- [non-pep585-annotation (UP006)](https://docs.astral.sh/ruff/rules/non-pep585-annotation/)
- [non-pep604-annotation (UP007)](https://docs.astral.sh/ruff/rules/non-pep604-annotation/)

For more details on PEP 563, see: https://peps.python.org/pep-0563/

## libtmux 0.40.1 (2024-12-24)

### Bug fix
6 changes: 5 additions & 1 deletion conftest.py
Original file line number Diff line number Diff line change
@@ -8,7 +8,8 @@
https://docs.pytest.org/en/stable/deprecations.html
"""

import pathlib
from __future__ import annotations

import shutil
import typing as t

@@ -21,6 +22,9 @@
from libtmux.session import Session
from libtmux.window import Window

if t.TYPE_CHECKING:
import pathlib

pytest_plugins = ["pytester"]


2 changes: 1 addition & 1 deletion docs/about.md
Original file line number Diff line number Diff line change
@@ -95,7 +95,7 @@ have dashes (-) replaced with underscores (\_).

## Reference

- tmux docs <http://www.openbsd.org/cgi-bin/man.cgi?query=tmux&sektion=1>
- tmux docs <https://man.openbsd.org/tmux.1>
- tmux source code <http://sourceforge.net/p/tmux/tmux-code/ci/master/tree/>

[abstraction layer]: http://en.wikipedia.org/wiki/Abstraction_layer
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 8 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# flake8: NOQA: E501
"""Sphinx configuration for libtmux."""

from __future__ import annotations

import contextlib
import inspect
import pathlib
@@ -72,7 +74,7 @@
html_extra_path = ["manifest.json"]
html_theme = "furo"
html_theme_path: list[str] = []
html_theme_options: dict[str, t.Union[str, list[dict[str, str]]]] = {
html_theme_options: dict[str, str | list[dict[str, str]]] = {
"light_logo": "img/libtmux.svg",
"dark_logo": "img/libtmux.svg",
"footer_icons": [
@@ -90,7 +92,7 @@
"source_repository": f"{about['__github__']}/",
"source_branch": "master",
"source_directory": "docs/",
"announcement": "<em>Friendly reminder:</em> 📌 Pin the package, libtmux is pre-1.0 and APIs will be <a href='/migration.html'>changing</a> throughout 2022-2024.",
"announcement": "<em>Friendly reminder:</em> 📌 Pin the package, libtmux is pre-1.0 and APIs will be <a href='/migration.html'>changing</a> throughout 2025.",
}
html_sidebars = {
"**": [
@@ -104,7 +106,7 @@
}

# linkify_issues
issue_url_tpl = f'{about["__github__"]}/issues/{{issue_id}}'
issue_url_tpl = f"{about['__github__']}/issues/{{issue_id}}"

# sphinx.ext.autodoc
autoclass_content = "both"
@@ -138,7 +140,7 @@
}


def linkcode_resolve(domain: str, info: dict[str, str]) -> t.Union[None, str]:
def linkcode_resolve(domain: str, info: dict[str, str]) -> None | str:
"""
Determine the URL corresponding to Python object.
@@ -208,7 +210,7 @@ def linkcode_resolve(domain: str, info: dict[str, str]) -> t.Union[None, str]:
)


def remove_tabs_js(app: "Sphinx", exc: Exception) -> None:
def remove_tabs_js(app: Sphinx, exc: Exception) -> None:
"""Remove tabs.js from _static after build."""
# Fix for sphinx-inline-tabs#18
if app.builder.format == "html" and not exc:
@@ -217,6 +219,6 @@ def remove_tabs_js(app: "Sphinx", exc: Exception) -> None:
tabs_js.unlink() # When python 3.7 deprecated, use missing_ok=True


def setup(app: "Sphinx") -> None:
def setup(app: Sphinx) -> None:
"""Configure Sphinx app hooks."""
app.connect("build-finished", remove_tabs_js)
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ hide-toc: true
quickstart
about
topics/traversal
reference/index
api/index
pytest-plugin/index
```

9 changes: 9 additions & 0 deletions docs/redirects.txt
Original file line number Diff line number Diff line change
@@ -6,3 +6,12 @@
"sessions.md" "reference/sessions.md"
"api.md" "reference/index.md"
"pytest-plugin.md" "pytest-plugin/index.md"
"reference/common.md" "api/common.md"
"reference/constants.md" "api/constants.md"
"reference/exceptions.md" "api/exceptions.md"
"reference/index.md" "api/index.md"
"reference/panes.md" "api/panes.md"
"reference/properties.md" "api/properties.md"
"reference/servers.md" "api/servers.md"
"reference/sessions.md" "api/sessions.md"
"reference/windows.md" "api/windows.md"
18 changes: 17 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "libtmux"
version = "0.40.1"
version = "0.41.0"
description = "Typed library that provides an ORM wrapper for tmux, a terminal multiplexer."
requires-python = ">=3.9,<4.0"
authors = [
@@ -145,6 +145,7 @@ exclude_lines = [
"if TYPE_CHECKING:",
"if t.TYPE_CHECKING:",
"@overload( |$)",
"from __future__ import annotations",
]

[tool.ruff]
@@ -168,16 +169,31 @@ select = [
"PERF", # Perflint
"RUF", # Ruff-specific rules
"D", # pydocstyle
"FA100", # future annotations
]
ignore = [
"COM812", # missing trailing comma, ruff format conflict
]
extend-safe-fixes = [
"UP006",
"UP007",
]
pyupgrade.keep-runtime-typing = false

[tool.ruff.lint.isort]
known-first-party = [
"libtmux",
]
combine-as-imports = true
required-imports = [
"from __future__ import annotations",
]

[tool.ruff.lint.flake8-builtins]
builtins-allowed-modules = [
"dataclasses",
"types",
]

[tool.ruff.lint.pydocstyle]
convention = "numpy"
4 changes: 3 additions & 1 deletion src/libtmux/__about__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
"""Metadata package for libtmux."""

from __future__ import annotations

__title__ = "libtmux"
__package_name__ = "libtmux"
__version__ = "0.40.1"
__version__ = "0.41.0"
__description__ = "Typed scripting library / ORM / API wrapper for tmux"
__email__ = "tony@git-pull.com"
__author__ = "Tony Narlock"
2 changes: 2 additions & 0 deletions src/libtmux/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""libtmux, a typed, pythonic API wrapper for the tmux terminal multiplexer."""

from __future__ import annotations

from .__about__ import (
__author__,
__copyright__,
4 changes: 3 additions & 1 deletion src/libtmux/_internal/dataclasses.py
Original file line number Diff line number Diff line change
@@ -5,6 +5,8 @@
This is an internal API not covered by versioning policy.
"""

from __future__ import annotations

import dataclasses
import typing as t
from operator import attrgetter
@@ -78,7 +80,7 @@ class SkipDefaultFieldsReprMixin:
ItemWithMixin(name=Test, unit_price=2.05)
"""

def __repr__(self: "DataclassInstance") -> str:
def __repr__(self: DataclassInstance) -> str:
"""Omit default fields in object representation."""
nodef_f_vals = (
(f.name, attrgetter(f.name)(self))
Loading