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 Oct 23, 2023
1 parent cee1414 commit 0e1596d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion crystal_toolkit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from monty.json import MSONable

import crystal_toolkit.helpers.layouts as ctl
from crystal_toolkit.core.jupyter import patch_msonable
from crystal_toolkit.renderables import (
Lattice,
Expand All @@ -16,7 +17,6 @@
StructureGraph,
VolumetricData,
)
import crystal_toolkit.helpers.layouts as ctl

patch_msonable()

Expand Down
14 changes: 6 additions & 8 deletions crystal_toolkit/helpers/layouts.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
"""
Helper methods to make working with Bulma classes easier. This file incorporates
Helper methods to make working with Bulma classes easier. This file incorporates
language from the Bulma documentation. See https://github.com/jgthms/bulma/blob/master/LICENSE
"""

from __future__ import annotations

import warnings
from typing import Any, Literal, TypeAlias, Union, Sequence
from typing import TYPE_CHECKING, Any, Literal, Sequence, TypeAlias
from uuid import uuid4

import dash_mp_components as mpc
from dash import dcc, html
from dash.development.base_component import Component
from monty.serialization import loadfn

from crystal_toolkit.settings import SETTINGS

if TYPE_CHECKING:
from dash.development.base_component import Component

BulmaSize: TypeAlias = Literal["small", "normal", "medium", "large"]

Expand Down Expand Up @@ -683,7 +684,7 @@ def __init__(
class Breadcrumb(html.Nav):
def __init__(
self,
parts: Sequence[tuple[Union[str, Component], str]],
parts: Sequence[tuple[str | Component, str]],
alignment: Literal["centered", "right"] | None = None,
separator: Literal["arrow", "bullet", "dot", "succeeds"] | None = None,
size: Literal["small", "medium", "large"] | None = None,
Expand Down Expand Up @@ -1273,10 +1274,7 @@ def __init__(self, *args, **kwargs) -> None:

FONT_AWESOME_CSS = {"external_url": SETTINGS.FONT_AWESOME_CSS_URL}

if SETTINGS.DOI_CACHE_PATH:
DOI_CACHE = loadfn(SETTINGS.DOI_CACHE_PATH)
else:
DOI_CACHE = {}
DOI_CACHE = loadfn(SETTINGS.DOI_CACHE_PATH) if SETTINGS.DOI_CACHE_PATH else {}


def get_table(rows: list[list[Any]], header: list[str] | None = None) -> html.Table:
Expand Down

0 comments on commit 0e1596d

Please sign in to comment.