Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit suggestions (#308)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit suggestions

updates:
- [github.com/pre-commit/mirrors-prettier: v3.1.0 → v4.0.0-alpha.8](pre-commit/mirrors-prettier@v3.1.0...v4.0.0-alpha.8)
- [github.com/astral-sh/ruff-pre-commit: v0.5.6 → v0.6.3](astral-sh/ruff-pre-commit@v0.5.6...v0.6.3)
- [github.com/abravalheri/validate-pyproject: v0.18 → v0.19](abravalheri/validate-pyproject@v0.18...v0.19)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Apply suggestions from code review

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jirka Borovec <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and Borda authored Sep 3, 2024
1 parent 6807e92 commit 3cd2d80
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ repos:
args: ["--print-width=120"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.6
rev: v0.6.3
hooks:
- id: ruff
args: ["--fix"]
Expand All @@ -73,6 +73,6 @@ repos:
- id: pyproject-fmt
additional_dependencies: [tox]
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.18
rev: v0.19
hooks:
- id: validate-pyproject
3 changes: 2 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
import re
from typing import List

import lightning_utilities
import pt_lightning_sphinx_theme

import lightning_utilities
from lightning_utilities.docs import adjust_linked_external_docs, fetch_external_assets

# This function is used to populate the (source) links in the API
Expand Down
3 changes: 2 additions & 1 deletion tests/unittests/core/test_apply_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
from typing import Any, ClassVar, List, Optional

import pytest
from lightning_utilities.core.apply_func import apply_to_collection, apply_to_collections
from unittests.mocks import torch

from lightning_utilities.core.apply_func import apply_to_collection, apply_to_collections

_TENSOR_0 = torch.tensor(0)
_TENSOR_1 = torch.tensor(1)

Expand Down
1 change: 1 addition & 0 deletions tests/unittests/core/test_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from unittest.mock import Mock

import pytest

from lightning_utilities.core.imports import (
RequirementCache,
compare_version,
Expand Down
1 change: 1 addition & 0 deletions tests/unittests/core/test_overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from unittest.mock import Mock

import pytest

from lightning_utilities.core.overrides import is_overridden


Expand Down
1 change: 1 addition & 0 deletions tests/unittests/core/test_rank_zero.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from lightning_utilities.core.rank_zero import rank_prefixed_message, rank_zero_only


Expand Down
3 changes: 2 additions & 1 deletion tests/unittests/docs/test_formatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
import re

import pytest

from lightning_utilities.docs import adjust_linked_external_docs


@pytest.mark.online()
@pytest.mark.online
def test_adjust_linked_external_docs(temp_docs):
# take config as it includes API references with `stable`
path_conf = os.path.join(temp_docs, "conf.py")
Expand Down
3 changes: 2 additions & 1 deletion tests/unittests/docs/test_retriever.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
import shutil

import pytest

from lightning_utilities.docs import fetch_external_assets


@pytest.mark.online()
@pytest.mark.online
def test_retriever_s3(temp_docs):
# take the index page
path_index = os.path.join(temp_docs, "index.rst")
Expand Down
1 change: 1 addition & 0 deletions tests/unittests/test/test_warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from re import escape

import pytest

from lightning_utilities.test.warning import no_warning_call


Expand Down

0 comments on commit 3cd2d80

Please sign in to comment.