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
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.11"
python-version: "3.14"
- uses: pre-commit/action@v3.0.0

build:
Expand All @@ -23,12 +23,12 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.11", "3.12", "3.13", "3.14"]
include:
- os: macos-latest # macos test
python-version: "3.11"
python-version: "3.14"
- os: windows-latest # windows test
python-version: "3.11"
python-version: "3.14"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ default_install_hook_types: [pre-commit]

repos:
- repo: https://github.com/psf/black
rev: 22.6.0
rev: 26.1.0
hooks:
- id: black

Expand All @@ -13,11 +13,11 @@ repos:
exclude: tests\/test_.+\.

- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
rev: v3.21.2
hooks:
- id: pyupgrade

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.259
rev: v0.14.13
hooks:
- id: ruff
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
https://www.sphinx-doc.org/en/master/usage/configuration.html
"""


# -- Path setup ----------------------------------------------------------------

from datetime import datetime
Expand Down
9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,14 @@ doc = ["sphinx-copybutton", "pydata-sphinx-theme", "sphinx-design"]
test = ["pytest", "beautifulsoup4", "pytest-regressions", "pytest-cov"]

[tool.ruff]
ignore-init-module-imports = true
fix = true
select = ["E", "F", "W", "I", "D", "RUF"]
ignore = ["E501"] # line too long | Black take care of it
lint.select = ["E", "F", "W", "I", "D", "RUF"]
lint.ignore = ["E501"] # line too long | Black take care of it

[tool.ruff.flake8-quotes]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"

[tool.ruff.pydocstyle]
[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.coverage.run]
Expand Down
1 change: 1 addition & 0 deletions sphinxcontrib/youtube/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Sphinx "youtube" extension."""

from . import peertube, utils, vimeo, youtube

__version__ = "1.4.1"
Expand Down
4 changes: 3 additions & 1 deletion sphinxcontrib/youtube/peertube.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Directive dedicated to the peertube platform."""

from typing import ClassVar

from docutils.parsers.rst import directives

from . import utils
Expand All @@ -22,7 +24,7 @@ class PeerTube(utils.Video):
_platform_url = "peertube.tv"

# optional options available
option_spec = {
option_spec: ClassVar = {
"width": directives.unchanged,
"height": directives.unchanged,
"aspect": directives.unchanged,
Expand Down
3 changes: 2 additions & 1 deletion sphinxcontrib/youtube/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import re
from pathlib import Path
from typing import ClassVar

import requests
from docutils import nodes
Expand Down Expand Up @@ -65,7 +66,7 @@ class Video(Directive):
required_arguments = 1
optional_arguments = 0
final_argument_whitespace = False
option_spec = {
option_spec: ClassVar = {
"width": directives.unchanged,
"height": directives.unchanged,
"aspect": directives.unchanged,
Expand Down
5 changes: 3 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
"""Pytest configuration."""

from pathlib import Path

import pytest
from sphinx.testing.path import path

pytest_plugins = "sphinx.testing.fixtures"


@pytest.fixture(scope="session")
def rootdir():
"""Get the root directory for the whole test session."""
return path(__file__).parent.abspath() / "roots"
return Path(__file__).parent.absolute() / "roots"
Loading