Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Commit

Permalink
chore: lint 🚨
Browse files Browse the repository at this point in the history
  • Loading branch information
meysam81 committed Oct 25, 2022
1 parent 9359abe commit 35b80f8
Show file tree
Hide file tree
Showing 23 changed files with 22 additions and 28 deletions.
1 change: 0 additions & 1 deletion licenseware/app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from licenseware.exceptions.custom_exceptions import ErrorAlreadyAttached
from licenseware.report.report import NewReport, NewReportComponent
from licenseware.uploader.uploader import NewUploader
from licenseware.utils.alter_string import get_altered_strings


@dataclass
Expand Down
1 change: 1 addition & 0 deletions licenseware/history/func.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import inspect

from licenseware.constants.worker_event_type import WorkerEvent


Expand Down
2 changes: 1 addition & 1 deletion licenseware/history/history.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import datetime
import inspect
import time
import datetime
import traceback
from functools import wraps
from typing import Any, Callable, Union
Expand Down
1 change: 0 additions & 1 deletion licenseware/history/metadata.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import inspect
import os
from dataclasses import dataclass, fields
from typing import Any
Expand Down
4 changes: 2 additions & 2 deletions licenseware/history/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
import json
import inspect
import json
import os

from .func import get_value_from_func

Expand Down
2 changes: 1 addition & 1 deletion licenseware/report/registered_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from licenseware.config.config import Config
from licenseware.constants.web_response import WebResponse
from licenseware.redis_cache.redis_cache import RedisCache
from licenseware.report.report_component import NewReportComponent
from licenseware.report.report_public_token import ReportPublicToken
from licenseware.report.report_snapshot import ReportSnapshot
Expand All @@ -11,7 +12,6 @@
from licenseware.utils.create_file import create_file
from licenseware.utils.failsafe_decorator import failsafe
from licenseware.utils.get_machine_info import get_machine_token
from licenseware.redis_cache.redis_cache import RedisCache


class RegisteredComponents: # pragma no cover
Expand Down
1 change: 1 addition & 0 deletions licenseware/utils/failsafe_decorator.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import traceback
from functools import wraps

from licenseware.constants.web_response import WebResponse

from .logger import log
Expand Down
1 change: 1 addition & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os

from licenseware import Config

tenant_id = "69464c40-bb57-488f-9aac-174d57b28d2e"
Expand Down
8 changes: 1 addition & 7 deletions tests/test_create_files.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
import os
import shutil

from licenseware import (
create_csv_file,
create_file,
create_json_file,
create_xlsx_file,
)
from licenseware import create_csv_file, create_file, create_json_file, create_xlsx_file

from . import config


# pytest -s -v tests/test_create_files.py


Expand Down
2 changes: 1 addition & 1 deletion tests/test_datatable.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import unittest

from licenseware import ColumnTypes, DataTable, ErrorAlreadyAttached
from . import config

from . import config

# pytest -s -v tests/test_datatable.py

Expand Down
3 changes: 1 addition & 2 deletions tests/test_default_check_quota_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
MongoRepository,
ValidationResponse,
get_mongodb_connection,
login_user,
)
from licenseware.uploader.default_handlers import default_check_quota_handler
from . import config, tenant_id

from . import config, tenant_id

# pytest -s -v tests/test_default_check_quota_handler.py

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

import pandas as pd
from fastapi import UploadFile

from werkzeug.datastructures import FileStorage

from licenseware import FileUploadHandler
Expand Down
4 changes: 2 additions & 2 deletions tests/test_get_user_info.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from licenseware import Config, get_user_info
from licenseware import get_user_info

from . import tenant_id, config
from . import config, tenant_id

# pytest -s -v tests/test_get_user_info.py

Expand Down
1 change: 1 addition & 0 deletions tests/test_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from licenseware import History, MongoRepository, history
from licenseware.history.metadata import get_metadata

from . import config


Expand Down
6 changes: 4 additions & 2 deletions tests/test_history_worker_decorator.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import os
import uuid
import time
import uuid
from typing import List
from licenseware import WorkerEvent, HistoryLogger, get_mongodb_connection

from licenseware import HistoryLogger, WorkerEvent, get_mongodb_connection

from . import config


Expand Down
1 change: 1 addition & 0 deletions tests/test_kafka.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from confluent_kafka import Producer as KafkaProducer

from licenseware import Config, Consumer, EventType, Producer, TopicType

from . import config

# pytest -s -v tests/test_kafka.py
Expand Down
1 change: 0 additions & 1 deletion tests/test_new_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

from . import config


# pytest -s -v tests/test_new_app.py

t = unittest.TestCase()
Expand Down
2 changes: 0 additions & 2 deletions tests/test_new_uploader.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from licenseware import (
Config,
FileTypes,
NewUploader,
UploaderEncryptionParameters,
Expand All @@ -13,7 +12,6 @@

from . import config


# pytest -s -v tests/test_new_uploader.py


Expand Down
1 change: 1 addition & 0 deletions tests/test_quota.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from pymongo import MongoClient

from licenseware import MongoRepository, Quota, login_user

from . import config


Expand Down
1 change: 1 addition & 0 deletions tests/test_redis_cache.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from licenseware import RedisCache

from . import config

# pytest -s -v tests/test_redis_cache.py
Expand Down
2 changes: 0 additions & 2 deletions tests/test_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from licenseware import (
BarHorizontalAttrs,
Config,
ErrorAlreadyAttached,
Icons,
NewReport,
Expand All @@ -16,7 +15,6 @@

from . import config


# pytest -s -v tests/test_report.py

t = unittest.TestCase()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_report_public_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from licenseware import ReportPublicToken

from . import tenant_id, config
from . import config, tenant_id

# pytest -s -v tests/test_report_public_token.py

Expand Down
2 changes: 1 addition & 1 deletion tests/test_report_snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
get_redis_cache,
)

from . import tenant_id, config
from . import config, tenant_id


@pytest.fixture
Expand Down

0 comments on commit 35b80f8

Please sign in to comment.