Skip to content

Commit

Permalink
more pre-commit checks
Browse files Browse the repository at this point in the history
  • Loading branch information
dhimmel committed Jun 13, 2021
1 parent 9ebbb11 commit 16ccc5d
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 12 deletions.
19 changes: 18 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-merge-conflict
- id: debug-statements
- id: mixed-line-ending
- id: check-case-conflict
- id: check-yaml
- repo: https://github.com/timothycrosley/isort
rev: 5.8.0
hooks:
- id: isort
- repo: https://github.com/ambv/black
rev: stable
rev: 21.6b0
hooks:
- id: black
language_version: python3
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
language_version: python3
2 changes: 1 addition & 1 deletion hetnetpy/matrix.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging
from collections import OrderedDict

import logging
import numpy
import scipy.sparse

Expand Down
2 changes: 1 addition & 1 deletion hetnetpy/pathtools.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import itertools
import functools
import itertools
import operator

from hetnetpy.hetnet import Node, Path
Expand Down
2 changes: 1 addition & 1 deletion hetnetpy/permute.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import collections
import random
import logging
import random

from hetnetpy.hetnet import Graph

Expand Down
2 changes: 1 addition & 1 deletion hetnetpy/readwrite.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import collections
import csv
import io
import importlib
import io
import json
import mimetypes
import operator
Expand Down
2 changes: 1 addition & 1 deletion hetnetpy/stats.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pandas
import matplotlib
import matplotlib.backends.backend_pdf
import pandas
import seaborn


Expand Down
15 changes: 15 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[flake8]
ignore =
E203
E402
E501
E731
W503

[isort]
profile = black
multi_line_output = 3
include_trailing_comma = True
force_grid_wrap = 0
use_parentheses = True
line_length = 88
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pathlib
import re

import setuptools

Expand Down
2 changes: 1 addition & 1 deletion test/graph_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import hetnetpy.hetnet
import hetnetpy.readwrite

from .readwrite_test import formats, extensions
from .readwrite_test import extensions, formats


def test_creation(tmpdir):
Expand Down
2 changes: 1 addition & 1 deletion test/matrix_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import pytest
import scipy.sparse

from hetnetpy.matrix import metaedge_to_adjacency_matrix, sparsify_or_densify
import hetnetpy.readwrite
from hetnetpy.matrix import metaedge_to_adjacency_matrix, sparsify_or_densify

directory = os.path.dirname(os.path.abspath(__file__))

Expand Down
2 changes: 1 addition & 1 deletion test/neo4j_test.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import pathlib
import textwrap

from neo4j import GraphDatabase
import pytest
from neo4j import GraphDatabase

import hetnetpy.neo4j
import hetnetpy.readwrite
Expand Down
2 changes: 1 addition & 1 deletion test/pathtools_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest

import hetnetpy.readwrite
from hetnetpy.pathtools import paths_between, DWPC
from hetnetpy.pathtools import DWPC, paths_between

directory = os.path.dirname(os.path.abspath(__file__))

Expand Down
1 change: 0 additions & 1 deletion test/readwrite_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import hetnetpy.readwrite


directory = os.path.dirname(os.path.abspath(__file__))

formats = ["json", "pkl"]
Expand Down

0 comments on commit 16ccc5d

Please sign in to comment.