Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

Commit 3aefab8

Browse files
committed
ruff format
1 parent 2687f0f commit 3aefab8

File tree

11 files changed

+132
-116
lines changed

11 files changed

+132
-116
lines changed

neptyne_kernel/dash.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@
199199
from .json_tools import json_clean
200200

201201
import ipykernel
202+
202203
IPYKERNEL_MAJOR_VERSION = int(ipykernel.__version__.split(".")[0])
203204

204205
try:
@@ -209,6 +210,7 @@
209210
try:
210211
from shapely.geometry.base import BaseGeometry as ShapelyBaseGeometry
211212
from shapely.geometry.point import Point as ShapelyPoint
213+
212214
_HAS_SHAPELY = True
213215
except ImportError:
214216
_HAS_SHAPELY = False

neptyne_kernel/dash_traceback.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,13 @@
1919
try:
2020
from IPython.core.ultratb import _format_filename as format_filename
2121
except ImportError:
22-
def format_filename(filename: str, filename_color: str, normal_color: str, lineno: int | None = None) -> str:
22+
23+
def format_filename(
24+
filename: str, filename_color: str, normal_color: str, lineno: int | None = None
25+
) -> str:
2326
return filename
2427

28+
2529
if TYPE_CHECKING:
2630
from stack_data.core import FrameInfo
2731

neptyne_kernel/expression_compiler.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,9 +1019,7 @@ def compile_expression(
10191019
)
10201020

10211021

1022-
def reformat_code(
1023-
code: str, line_length: int | None = None
1024-
) -> tuple[str, bool]:
1022+
def reformat_code(code: str, line_length: int | None = None) -> tuple[str, bool]:
10251023
"""Reformat the code. Might raise a ValueError.
10261024
Returns:
10271025
(code, is_modified) when 'black' succeeds (is_modified=True) or returns unchanged code (is_modified=False),

neptyne_kernel/formula_names.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def _get_names_from_module(obj: ModuleType, prefix: str = "") -> set[str]:
1818
FORMULA_NAMES: set[str]
1919
try:
2020
from . import formulas
21-
FORMULA_NAMES = _get_names_from_module(formulas)
21+
22+
FORMULA_NAMES = _get_names_from_module(formulas)
2223
except ImportError:
2324
FORMULA_NAMES = set()

neptyne_kernel/mime_handling.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ def decode_date(
119119

120120
try:
121121
import shapely.wkt
122+
122123
MIME_TYPE_HANDLERS[WELL_KNOWN_TEXT_KEY] = lambda x: shapely.wkt.loads(x)
123124
except ImportError:
124125
pass

neptyne_kernel/neptyne_api/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,14 @@
5454

5555
try:
5656
from . import data
57+
5758
COMMON += ["data"]
5859
except ImportError:
5960
pass
6061

6162
try:
6263
from . import geo
64+
6365
COMMON += ["geo"]
6466
except ImportError:
6567
pass

neptyne_kernel/proxied_apis.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ def proxy_url(
160160
)
161161
try:
162162
import google.generativeai as genai
163+
163164
genai.configure(
164165
api_key=PLACEHOLDER_API_KEY,
165166
transport="rest",

0 commit comments

Comments
 (0)