Skip to content

Commit 8157b8a

Browse files
authored
Update ruff lint select rules (#81)
1 parent b4269d6 commit 8157b8a

File tree

8 files changed

+28
-24
lines changed

8 files changed

+28
-24
lines changed

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ select = [
7777
# "BLE", # flake8-blind-except (checks the except blocks that do not specify exception)
7878
# "FBT", # flake8-boolean-trap (ensure that boolean args can be used with kw only)
7979
# "E", # pycodestyle errors (PEP 8 style guide violations)
80-
# "W", # pycodestyle warnings (e.g., extra spaces, indentation issues)
80+
"W", # pycodestyle warnings (e.g., extra spaces, indentation issues)
8181
# "DOC", # pydoclint issues (e.g., extra or missing return, yield, warnings)
8282
# "A", # flake8-buitins (check variable and function names to not shadow builtins)
8383
# "N", # Naming convention checks (e.g., PEP 8 variable and function names)
84-
# "F", # Pyflakes errors (e.g., unused imports, undefined variables)
84+
"F", # Pyflakes errors (e.g., unused imports, undefined variables)
8585
# "I", # isort (Ensures imports are sorted properly)
8686
# "B", # flake8-bugbear (Detects likely bugs and bad practices)
87-
# "TID", # flake8-tidy-imports (Checks for banned or misplaced imports)
87+
"TID", # flake8-tidy-imports (Checks for banned or misplaced imports)
8888
"UP", # pyupgrade (Automatically updates old Python syntax)
8989
# "YTT", # flake8-2020 (Detects outdated Python 2/3 compatibility issues)
9090
# "FLY", # flynt (Converts old-style string formatting to f-strings)

src/lasso/diffcrash/diffcrash_run.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
from pathlib import Path
1515
import psutil
1616

17-
from ..logging import str_error, str_info, str_running, str_success, str_warn
17+
# from ..logging import str_error, str_info, str_running, str_success, str_warn
18+
from lasso.logging import str_error, str_info, str_running, str_success, str_warn
1819

1920
# pylint: disable = too-many-lines
2021

src/lasso/diffcrash/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
parse_diffcrash_args,
1414
)
1515

16-
from ..logging import str_error
16+
from lasso.logging import str_error
1717

1818

1919
def _parse_stages(start_stage: str, end_stage: str):

src/lasso/dimred/dimred_run.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,15 @@
1818
from rich.table import Table
1919
from rich.text import Text
2020

21-
from ..utils.rich_progress_bars import PlaceHolderBar, WorkingDots
22-
from .svd.clustering_betas import create_cluster_arg_dict, create_detector_arg_dict, group_betas
23-
from .svd.plot_beta_clusters import plot_clusters_js
24-
from .svd.pod_functions import calculate_v_and_betas
25-
from .svd.subsampling_methods import create_reference_subsample, remap_random_subsample
21+
from lasso.utils.rich_progress_bars import PlaceHolderBar, WorkingDots
22+
from lasso.dimred.svd.clustering_betas import (
23+
create_cluster_arg_dict,
24+
create_detector_arg_dict,
25+
group_betas,
26+
)
27+
from lasso.dimred.svd.plot_beta_clusters import plot_clusters_js
28+
from lasso.dimred.svd.pod_functions import calculate_v_and_betas
29+
from lasso.dimred.svd.subsampling_methods import create_reference_subsample, remap_random_subsample
2630

2731
# pylint: disable = too-many-lines
2832

src/lasso/dimred/hashing.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
from scipy import integrate
1010
from sklearn.neighbors import KDTree
1111

12-
13-
from ..math.stochastic import jensen_shannon_entropy
12+
from lasso.math.stochastic import jensen_shannon_entropy
1413

1514

1615
def _match_modes(

src/lasso/dimred/svd/subsampling_methods.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import numpy as np
88
from sklearn.neighbors import NearestNeighbors
99

10-
from ...dyna import ArrayType, D3plot
10+
from lasso.dyna import ArrayType, D3plot
1111

1212

1313
def _mark_dead_eles(node_indexes: np.ndarray, alive_shells: np.ndarray) -> np.ndarray:

src/lasso/dyna/d3plot.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515

1616
import numpy as np
1717

18-
from ..femzip.femzip_api import FemzipAPI, FemzipBufferInfo, FemzipVariableCategory
19-
from ..io.binary_buffer import BinaryBuffer
20-
from ..io.files import open_file_or_filepath
21-
from ..logging import get_logger
22-
from ..plotting import plot_shell_mesh
23-
from .array_type import ArrayType
24-
from .d3plot_header import D3plotFiletype, D3plotHeader
25-
from .femzip_mapper import FemzipMapper, filter_femzip_variables
26-
from .filter_type import FilterType
18+
from lasso.femzip.femzip_api import FemzipAPI, FemzipBufferInfo, FemzipVariableCategory
19+
from lasso.io.binary_buffer import BinaryBuffer
20+
from lasso.io.files import open_file_or_filepath
21+
from lasso.logging import get_logger
22+
from lasso.plotting import plot_shell_mesh
23+
from lasso.dyna.array_type import ArrayType
24+
from lasso.dyna.d3plot_header import D3plotFiletype, D3plotHeader
25+
from lasso.dyna.femzip_mapper import FemzipMapper, filter_femzip_variables
26+
from lasso.dyna.filter_type import FilterType
2727

2828
# pylint: disable = too-many-lines
2929

src/lasso/dyna/d3plot_header.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import numpy as np
55
import rich
66

7-
from ..io.binary_buffer import BinaryBuffer
8-
from ..logging import get_logger
7+
from lasso.io.binary_buffer import BinaryBuffer
8+
from lasso.logging import get_logger
99

1010
# We have a lot of docstrings here but even if not so, we want to contain the
1111
# code here.

0 commit comments

Comments
 (0)