Skip to content

Commit

Permalink
Move majority of pylint disable from pyproject.toml to the files they…
Browse files Browse the repository at this point in the history
… apply to.
  • Loading branch information
mihaeladuta committed Dec 5, 2024
1 parent bf9d127 commit 479f6d9
Show file tree
Hide file tree
Showing 17 changed files with 48 additions and 6 deletions.
3 changes: 3 additions & 0 deletions l2gv2/clustering.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# pylint: disable=too-many-locals
# pylint: disable=too-many-arguments
# pylint: disable=too-many-positional-arguments
"""Graph clustering algorithms"""

from math import log
Expand Down
3 changes: 3 additions & 0 deletions l2gv2/embedding/dgi/layers/discriminator.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# pylint: disable=too-many-arguments
# pylint: disable=too-many-positional-arguments

"""TODO: module docstring for dgi/layers/discriminator.py."""

import torch
Expand Down
2 changes: 2 additions & 0 deletions l2gv2/embedding/dgi/models/dgi.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# pylint: disable=too-many-arguments
# pylint: disable=too-many-positional-arguments
"""TODO: module docstring for dgi/models/dgi.py."""

from torch import nn
Expand Down
2 changes: 2 additions & 0 deletions l2gv2/embedding/gae/layers/GAEconv.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# pylint: disable=invalid-name
# pylint: disable=too-many-arguments
# pylint: disable=too-many-positional-arguments
"""TODO: module docstring for embedding/gae/layers/GAEconv.py."""

import torch
Expand Down
2 changes: 2 additions & 0 deletions l2gv2/embedding/gae/layers/VGAEconv.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# pylint: disable=invalid-name
# pylint: disable=too-many-arguments
# pylint: disable=too-many-positional-arguments
"""TODO: module docstring for embedding/gae/layers/VGAEconv.py."""

import torch
Expand Down
6 changes: 5 additions & 1 deletion l2gv2/embedding/svd.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
"""TODO: module docstring for embedding/svd.py"""

# pylint: disable=invalid-name
# pylint: disable=too-many-locals
# pylint: disable=too-many-arguments
# pylint: disable=too-many-positional-arguments
"""TODO: module docstring for embedding/svd.py"""

import scipy.sparse as ss
import scipy.sparse.linalg as sl
import numpy as np
Expand Down
3 changes: 3 additions & 0 deletions l2gv2/embedding/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# pylint: disable=too-many-arguments
# pylint: disable=too-many-positional-arguments
"""TODO: module docstring for embedding/train.py."""

import torch
Expand Down
3 changes: 3 additions & 0 deletions l2gv2/example.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# pylint: disable=too-many-locals
# pylint: disable=too-many-arguments
# pylint: disable=too-many-positional-arguments
"""Generate synthetic test data."""

import argparse
Expand Down
3 changes: 3 additions & 0 deletions l2gv2/manopt_optimization.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# pylint: disable=too-many-locals
# pylint: disable=too-many-arguments
# pylint: disable=too-many-positional-arguments
"""Module with functions for the optimization of the
embeddings of the patches using the manopt library."""

Expand Down
3 changes: 3 additions & 0 deletions l2gv2/models.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# pylint: disable=too-many-locals
# pylint: disable=too-many-arguments
# pylint: disable=too-many-positional-arguments
"""This module contains the functions to compute the
embeddings of a list of patches using VGAE and Node2Vec."""

Expand Down
3 changes: 3 additions & 0 deletions l2gv2/network/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# pylint: disable=too-many-arguments
# pylint: disable=too-many-positional-arguments
"""TODO: module docstring for network/graph.py"""

from typing import Sequence, Iterable
Expand Down
7 changes: 5 additions & 2 deletions l2gv2/network/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"""Graph data handling"""

# Copyright (c) 2021. Lucas G. S. Jeub
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
Expand All @@ -20,6 +18,11 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# pylint: disable=too-many-locals
# pylint: disable=too-many-arguments
# pylint: disable=too-many-positional-arguments
"""Graph data handling"""

import torch
import numpy as np
import numba
Expand Down
3 changes: 3 additions & 0 deletions l2gv2/patch/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# pylint: disable=too-many-arguments
# pylint: disable=too-many-positional-arguments
"""TODO: module docstring"""

import copy
Expand Down
4 changes: 4 additions & 0 deletions l2gv2/patch/patches.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# pylint: disable=too-many-locals
# pylint: disable=too-many-arguments
# pylint: disable=too-many-positional-arguments

"""Dividing input data into overlapping patches"""

from random import choice
Expand Down
3 changes: 3 additions & 0 deletions l2gv2/patch/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

# pylint: disable=too-many-locals
# pylint: disable=too-many-arguments
# pylint: disable=too-many-positional-arguments
from pathlib import Path
import json
import copy
Expand Down
1 change: 1 addition & 0 deletions l2gv2/sparsify.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pylint: disable=too-many-locals
"""Graph sparsification"""
# pylint: disable=invalid-name

Expand Down
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ disable = [
"fixme",
"import-error",
"duplicate-code",
"too-many-locals",
"too-many-arguments",
"too-many-positional-arguments"
]

# pyright
Expand Down

0 comments on commit 479f6d9

Please sign in to comment.