Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

Commit

Permalink
Add isort as formatter and run it on the codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
isort authored and vikahl committed Aug 3, 2021
1 parent c5d0787 commit 14750ad
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion comet_core/api_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import logging
from functools import wraps

from flask import g, Response, current_app
from flask import Response, current_app, g

from comet_core.data_store import DataStore
from comet_core.fingerprint import fingerprint_hmac
Expand Down
2 changes: 1 addition & 1 deletion comet_core/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import json
from datetime import datetime

from sqlalchemy import Column, DateTime, Integer, JSON, String, UnicodeText, types
from sqlalchemy import JSON, Column, DateTime, Integer, String, UnicodeText, types
from sqlalchemy.ext.declarative import declarative_base


Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
[tool.isort]
profile = "black"
line_length = 120

[tool.black]
line-length = 120
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ pytest-cov==2.12.0
pytest-freezegun==0.4.2
tox==3.24.1
pylint==2.9.6
isort==5.8.0
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@

"""Global test fixtures"""
import os
from comet_core import Comet

import pytest

from comet_core import Comet


@pytest.fixture
def app():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_api_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import pytest

from comet_core.api import CometApi
from comet_core.api_helper import get_db, hydrate_open_issues, assert_valid_token, hydrate_with_request_headers
from comet_core.api_helper import assert_valid_token, get_db, hydrate_open_issues, hydrate_with_request_headers
from comet_core.fingerprint import fingerprint_hmac


Expand Down
2 changes: 1 addition & 1 deletion tests/test_api_v0.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from unittest import mock

import pytest
from flask import g, Response
from flask import Response, g

from comet_core.api import CometApi

Expand Down
2 changes: 1 addition & 1 deletion tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

"""Test comet_handler"""

import json
from datetime import datetime, timedelta
from unittest import mock
import json

from freezegun import freeze_time

Expand Down
2 changes: 1 addition & 1 deletion tests/test_data_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@

import pytest
from freezegun import freeze_time
from tests.utils import get_all_test_messages

import comet_core.data_store
from comet_core.data_store import remove_duplicate_events
from comet_core.model import EventRecord, IgnoreFingerprintRecord
from tests.utils import get_all_test_messages


@pytest.fixture
Expand Down
1 change: 0 additions & 1 deletion tests/test_fingerprinter.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

from comet_core.fingerprint import comet_event_fingerprint


ORIG_DICT = {"a": "b", "b": "c", "res": {"lel": "wahat", "gl": "hf"}}

ORIG_DICT_FP = "30c3e95d8fb3665ba70c6e3630a57d9a"
Expand Down

0 comments on commit 14750ad

Please sign in to comment.