Skip to content

Commit

Permalink
set ruff ignore E402 for geomstats backend
Browse files Browse the repository at this point in the history
  • Loading branch information
franciscoeacosta committed Aug 21, 2024
1 parent 98f239e commit fe1dd2e
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion neurometry/curvature/datasets/gridcells.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import neurometry.curvature.datasets.structures as structures

os.environ["GEOMSTATS_BACKEND"] = "pytorch"
import geomstats.backend as gs # noqa: E402
import geomstats.backend as gs


# TODO
Expand Down
4 changes: 2 additions & 2 deletions neurometry/curvature/datasets/synthetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
)

os.environ["GEOMSTATS_BACKEND"] = "pytorch"
import geomstats.backend as gs # noqa: E402
from geomstats.geometry.special_orthogonal import SpecialOrthogonal # noqa: E402
import geomstats.backend as gs
from geomstats.geometry.special_orthogonal import SpecialOrthogonal


def load_projected_images(n_scalars=5, n_angles=1000, img_size=128):
Expand Down
10 changes: 5 additions & 5 deletions neurometry/curvature/evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
)

os.environ["GEOMSTATS_BACKEND"] = "pytorch"
import geomstats.backend as gs # noqa: E402
from geomstats.geometry.base import ImmersedSet # noqa: E402
from geomstats.geometry.euclidean import Euclidean # noqa: E402
from geomstats.geometry.pullback_metric import PullbackMetric # noqa: E402
from geomstats.geometry.special_orthogonal import SpecialOrthogonal # noqa: E402
import geomstats.backend as gs
from geomstats.geometry.base import ImmersedSet
from geomstats.geometry.euclidean import Euclidean
from geomstats.geometry.pullback_metric import PullbackMetric
from geomstats.geometry.special_orthogonal import SpecialOrthogonal


class NeuralManifoldIntrinsic(ImmersedSet):
Expand Down
10 changes: 5 additions & 5 deletions neurometry/datasets/synthetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import torch

os.environ["GEOMSTATS_BACKEND"] = "pytorch"
import geomstats.backend as gs # noqa: E402
from geomstats.geometry.euclidean import Euclidean # noqa: E402
from geomstats.geometry.hypersphere import Hypersphere # noqa: E402
from geomstats.geometry.klein_bottle import KleinBottle # noqa: E402
from geomstats.geometry.product_manifold import ProductManifold # noqa: E402
import geomstats.backend as gs
from geomstats.geometry.euclidean import Euclidean
from geomstats.geometry.hypersphere import Hypersphere
from geomstats.geometry.klein_bottle import KleinBottle
from geomstats.geometry.product_manifold import ProductManifold


def synthetic_neural_manifold(
Expand Down
2 changes: 1 addition & 1 deletion neurometry/dimension/dimension.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import neurometry.datasets.synthetic as synthetic

os.environ["GEOMSTATS_BACKEND"] = "pytorch"
import geomstats.backend as gs # noqa: E402
import geomstats.backend as gs


def skdim_dimension_estimation(
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ select = [
]
ignore = [
"E501", # line too long
"E402", # ignore module level import not at top of file
"PERF203", # allow try-except within loops
"RUF012", # force typing
]
Expand Down

0 comments on commit fe1dd2e

Please sign in to comment.