Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit suggestions #308

Merged
merged 3 commits into from
Sep 3, 2024
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
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
Loading