Skip to content

Commit

Permalink
Enforce import sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
Jing Wang committed May 2, 2020
1 parent 1a25712 commit c6192ec
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
black
flake8
isort
mypy
pytest
pytest-cov
Expand Down
10 changes: 10 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ pyhdfs = py.typed
[egg_info]
tag_build = dev

[tool:isort]
case_sensitive = true
force_grid_wrap = 0
force_single_line = true
include_trailing_comma = true
line_length = 88
multi_line_output = 3
order_by_type = false
use_parentheses = true

[tool:pytest]
addopts = --random --tb=short --cov pyhdfs --cov test_pyhdfs --cov-report html --cov-report term
norecursedirs = env
Expand Down
5 changes: 4 additions & 1 deletion test_pyhdfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
import subprocess
import tempfile
import unittest
from unittest import mock
from http import HTTPStatus
from typing import Any
from typing import Callable
from typing import cast
from unittest import mock

import pytest
import requests
Expand Down Expand Up @@ -606,5 +606,8 @@ def test_black(self) -> None:
def test_flake8(self) -> None:
subprocess.check_call(["flake8"], cwd=os.path.dirname(__file__))

def test_isort(self) -> None:
subprocess.check_call(["isort", "--check-only"], cwd=os.path.dirname(__file__))

def test_mypy(self) -> None:
subprocess.check_call(["mypy", os.path.dirname(__file__)])

0 comments on commit c6192ec

Please sign in to comment.