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
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ jobs:
fail-fast: false
matrix:
include:
- nox-sessions: "black check_yaml check_json check_toml check_eof check_trailing_space check_lf"
- nox-sessions: "ruff_format ruff_lint check_yaml check_json check_toml check_eof check_trailing_space check_lf"
python-version: "3.x"
node-version: "16.x"
- nox-sessions: "mypy pylint"
- nox-sessions: "mypy"
python-version: "3.9"
- nox-sessions: "mypy pylint"
- nox-sessions: "mypy"
python-version: "3.10"
- nox-sessions: "mypy pylint"
- nox-sessions: "mypy"
python-version: "3.11"
- nox-sessions: "mypy pylint"
- nox-sessions: "mypy"
python-version: "3.12"
steps:
- uses: actions/checkout@v4
Expand All @@ -54,9 +54,9 @@ jobs:
if: matrix.node-version
with:
path: |
.nox/black
.nox/ruff_*
.nox/check_*
key: nox-${{ steps.python-setup.outputs.python-version }}-${{ hashFiles('requirements/dev-black.txt', 'requirements/dev-pre_commit_hooks.txt') }}
key: nox-${{ steps.python-setup.outputs.python-version }}-${{ hashFiles('requirements/dev-ruff.txt', 'requirements/dev-pre_commit_hooks.txt') }}
- run: npm install
if: matrix.node-version
- run: npm run check
Expand Down
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ nox
-r requirements/cpp.txt
-r requirements/dev-mypy.txt
-r requirements/dev-black.txt
-r requirements/dev-pylint.txt
-r requirements/dev-ruff.txt
9 changes: 7 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ def get_colors(color_t: str):
unique_colors.append(m.group(1))
return unique_colors


# jinja contexts
example_python_apigen_modules = {
"my_module": "my_api/",
Expand All @@ -373,8 +374,12 @@ def get_colors(color_t: str):
(
full_name,
overload_id,
python_apigen._get_docname(example_python_apigen_modules, full_name, overload_id, False),
python_apigen._get_docname(example_python_apigen_modules, full_name, overload_id, True),
python_apigen._get_docname(
example_python_apigen_modules, full_name, overload_id, False
),
python_apigen._get_docname(
example_python_apigen_modules, full_name, overload_id, True
),
)
for full_name, overload_id in example_python_apigen_objects
],
Expand Down
5 changes: 3 additions & 2 deletions docs/tensorstore_demo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@

from __future__ import annotations
import typing
import _abc

from ._tensorstore import *
from ._tensorstore import * # noqa: F403

# fmt: off


class Dim():
Expand Down
2 changes: 1 addition & 1 deletion docs/test_py_module/test.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# -*- coding: utf-8 -*-
"""Test Module for sphinx_rtd_theme."""

import functools
from typing import Union


class Foo:

"""Docstring for class Foo.

This text tests for the formatting of docstrings generated from output
Expand Down
5 changes: 2 additions & 3 deletions merge_from_mkdocs_material.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import json
import os
import pathlib
import shutil
import subprocess
import tempfile
from typing import Optional
Expand Down Expand Up @@ -243,7 +242,7 @@ def main():
message=f"Original upstream {merge_base} (adjusted)",
)

print(f"\nCreating adjusted commit for sphinx-immaterial")
print("\nCreating adjusted commit for sphinx-immaterial")
subprocess.run(
["git", "remote", "rm", "local-sphinx-immaterial"],
cwd=temp_workdir,
Expand Down Expand Up @@ -289,7 +288,7 @@ def main():
parent=old_tree_commit,
)

print(f"\nRebasing")
print("\nRebasing")
subprocess.run(["git", "rebase", new_tree_commit, "HEAD"], cwd=temp_workdir)

with open(patch_path, "wb") as patch_f:
Expand Down
24 changes: 12 additions & 12 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

nox.options.reuse_existing_virtualenvs = True
nox.options.sessions = [
"black",
"pylint",
"ruff_format",
"ruff_lint",
"mypy",
"check_yaml",
"check_json",
Expand All @@ -21,17 +21,17 @@


@nox.session
def black(session: nox.Session):
"""Checks formatting linting and typing"""
session.install("-r", "requirements/dev-black.txt")
session.run("black", ".")
def ruff_format(session: nox.Session):
"""Checks formatting with ruff"""
session.install("-r", "requirements/dev-ruff.txt")
session.run("ruff", "format")


@nox.session(python=False)
def pylint(session: nox.Session):
"""Run pylint using in default env"""
session.run("pip", "install", "-r", "requirements/dev-pylint.txt")
session.run("pylint", "sphinx_immaterial")
@nox.session
def ruff_lint(session: nox.Session):
"""Run ruff as linter"""
session.install("-r", "requirements/dev-ruff.txt")
session.run("ruff", "check")


@nox.session(python=False)
Expand All @@ -45,7 +45,7 @@ def mypy(session: nox.Session):
"|".join(
[
"\\.git/",
"^\\.(?:mypy|pylint|pytest|eslint)_?cache",
"^\\.(?:mypy|ruff|pytest|eslint)_?cache",
"^(?:\\.nox|\\.?env|\\.?venv)",
"^\\.coverage.*",
"^htmlcov/",
Expand Down
Loading