Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 29, 2024
1 parent 7d0d871 commit ea16e10
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions docs/checks/docs_link_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def _get_absolute_path(self, path: pathlib.Path) -> pathlib.Path:
return self._docs_root.joinpath(path).resolve()

def _get_absolute_path(self, path: str) -> str:
return os.path.join(self._docs_root, self._get_os_path(path)) # noqa: PTH118
return os.path.join(self._docs_root, self._get_os_path(path))

def _get_absolute_static_path(self, path: str) -> str:
return os.path.join(self._static_root, self._get_os_path(path))
Expand Down Expand Up @@ -201,7 +201,7 @@ def _check_absolute_image(
logger.debug(f"Checking absolute image {link} in file {file}")

image_file = self._get_absolute_static_path(path)
if not os.path.isfile(image_file): # noqa: PTH113
if not os.path.isfile(image_file):
logger.info(f"Absolute image {link} in file {file} was not found")
return LinkReport(link, file, f"Image {image_file} not found")
else:
Expand Down
5 changes: 3 additions & 2 deletions docs/docs_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
from contextlib import contextmanager
from functools import cached_property
from io import BytesIO
from packaging import version
from pathlib import Path
from typing import TYPE_CHECKING, Generator, Optional

from packaging import version

from docs.logging import Logger

if TYPE_CHECKING:
Expand Down Expand Up @@ -83,7 +84,7 @@ def _invoke_api_docs(self) -> None:
self._run("(cd ../../; invoke api-docs)")

def _read_prior_release_version_file(self) -> str:
with open(self._release_version_file, "r") as file:
with open(self._release_version_file) as file:
return file.read()

def _write_release_version(self, content: str) -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# <snippet name="core/expectation_suites/_examples/create_an_expectation_suite.py imports">
import great_expectations as gx
from great_expectations.core.expectation_suite import ExpectationSuite

# </snippet>

context = gx.get_context()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# <snippet name="tests/integration/docusaurus/core/expectations/create_an_expectation.py full example code">
# <snippet name="core/create_expectations/expectations/_examples/create_an_expectation.py import the expectations module">
import great_expectations.expectations as gxe

# </snippet>

# highlight-start
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# <snippet name="/core/validate_data/checkpoints/_examples/create_a_checkpoint.py import statements">
import great_expectations as gx
from great_expectations.core import Checkpoint

# </snippet>
# highlight-end

Expand Down
3 changes: 2 additions & 1 deletion docs/docusaurus/docs/snippets/actions.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from typing import TYPE_CHECKING, List, Union

from great_expectations.checkpoint.actions import ValidationAction
from great_expectations.compatibility.typing_extensions import override
from great_expectations.core.expectation_validation_result import (
ExpectationSuiteValidationResult,
)
from great_expectations.compatibility.typing_extensions import override
from great_expectations.data_context.types.resource_identifiers import (
GXCloudIdentifier,
ValidationResultIdentifier,
Expand Down
3 changes: 1 addition & 2 deletions docs/sphinx_api_docs_source/build_sphinx_api_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def my_task(
import enum
import importlib
import logging
import os
import pathlib
import shutil
import sys
Expand All @@ -31,7 +30,6 @@ def my_task(
from urllib.parse import urlparse

import invoke
from docs.sphinx_api_docs_source.utils import apply_markdown_adjustments

from docs.sphinx_api_docs_source.check_public_api_docstrings import (
get_public_api_definitions,
Expand All @@ -41,6 +39,7 @@ def my_task(
Definition,
get_shortest_dotted_path,
)
from docs.sphinx_api_docs_source.utils import apply_markdown_adjustments

logger = logging.getLogger(__name__)
logger.addHandler(logging.StreamHandler())
Expand Down
6 changes: 3 additions & 3 deletions docs/sphinx_api_docs_source/test_build_sphinx_api_docs.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from docs.sphinx_api_docs_source.conf import convert_code_blocks
from docs.sphinx_api_docs_source.utils import apply_markdown_adjustments
import pytest

from bs4 import (
BeautifulSoup,
)

from docs.sphinx_api_docs_source.conf import convert_code_blocks
from docs.sphinx_api_docs_source.utils import apply_markdown_adjustments


def test_convert_code_blocks():
name = "great_expectations.checkpoint.StoreMetricsAction"
Expand Down

0 comments on commit ea16e10

Please sign in to comment.