Skip to content

Commit

Permalink
Optimizer and lint imports
Browse files Browse the repository at this point in the history
  • Loading branch information
henryruhs committed Jul 3, 2024
1 parent 55b8212 commit 4b3f005
Show file tree
Hide file tree
Showing 47 changed files with 104 additions and 59 deletions.
5 changes: 4 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[flake8]
select = E3, E4, F
select = E3, E4, F, I1, I2
per-file-ignores = __init__.py:F401
plugins = flake8-import-order
application_import_names = chroma_feedback
import-order-style = pycharm
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
with:
python-version: 3.9
- run: pip install flake8
- run: pip install flake8-import-order
- run: pip install mypy
- run: pip install requests
- run: pip install types-mock
Expand All @@ -23,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
python-version: [ '3.9', '3.10', '3.11' ]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions chroma_feedback/install.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os

from setuptools.command.install import install

from chroma_feedback import helper
Expand Down
2 changes: 1 addition & 1 deletion chroma_feedback/logger.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from logging import basicConfig, getLogger, Logger, DEBUG, INFO, WARNING, ERROR
from logging import DEBUG, ERROR, INFO, Logger, WARNING, basicConfig, getLogger
from typing import Dict

from chroma_feedback.typing import LogLevel
Expand Down
2 changes: 1 addition & 1 deletion chroma_feedback/producer/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from argparse import ArgumentParser
from typing import Any, List

from chroma_feedback import producer, helper, logger, wording
from chroma_feedback import helper, logger, producer, wording
from chroma_feedback.typing import Producer


Expand Down
2 changes: 1 addition & 1 deletion chroma_feedback/reporter.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import Any, List
import os
from typing import Any, List

from chroma_feedback import color, helper, logger, metadata, wording
from chroma_feedback.typing import Consumer, ConsumerReport, Producer, ProducerReport, Status
Expand Down
2 changes: 1 addition & 1 deletion chroma_feedback/systray.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sys
import webbrowser
from typing import List
from functools import partial
from typing import List

from PyQt6.QtCore import Qt
from PyQt6.QtGui import QAction, QBrush, QColor, QIcon, QPainter, QPixmap
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/agile_innovative/blinkstick/test_device.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.agile_innovative.blinkstick.light import process_lights

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/compulab/fit_statusb/test_device.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.compulab.fit_statusb.light import process_lights

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/elgato/streamdeck/test_device.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.elgato.streamdeck.device import process_devices

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/embrava/blynclight/test_device.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.embrava.blynclight.light import process_lights

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/embrava/blynclight_mini/test_device.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.embrava.blynclight_mini.light import process_lights

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/embrava/blynclight_plus/test_device.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.embrava.blynclight_plus.light import process_lights

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/gigabyte/rgb_fusion2/test_device.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.gigabyte.rgb_fusion2.device import process_devices

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/kuando/busylight_alpha/test_device.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.kuando.busylight_alpha.light import process_lights

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/kuando/busylight_omega/test_device.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.kuando.busylight_omega.light import process_lights

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/lifx/lifx/test_group.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.lifx.lifx.group import process_groups

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/lifx/lifx/test_light.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.lifx.lifx.light import process_lights

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/luxafor/flag/test_device.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.luxafor.flag.light import process_lights

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/luxafor/mute/test_device.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.luxafor.mute.light import process_lights

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/luxafor/orb/test_device.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.luxafor.orb.light import process_lights

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/magic/hue/test_light.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.magic.hue.light import process_lights

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/muteme/muteme/test_device.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.muteme.muteme.light import process_lights

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/muteme/muteme_mini/test_device.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.muteme.muteme_mini.light import process_lights

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/mutesync/mutesync/test_device.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.mutesync.mutesync.light import process_lights

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/nanoleaf/nanoleaf/test_light.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.nanoleaf.nanoleaf.light import process_lights

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/philips/hue/test_group.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.philips.hue.group import process_groups

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/philips/hue/test_light.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.philips.hue.light import process_lights

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/plantronics/status_indicator/test_device.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.plantronics.status_indicator.light import process_lights

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/razer/chroma/test_device.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.razer.chroma.device import process_devices

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/signify/wiz/test_light.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.signify.wiz.light import process_lights

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/thingm/blink1/test_device.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.thingm.blink1.light import process_lights

MOCK = MagicMock()
Expand Down
3 changes: 2 additions & 1 deletion tests/consumer/xiaomi/yeelight/test_light.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock

import pytest

from chroma_feedback.consumer.xiaomi.yeelight.light import process_lights

MOCK = MagicMock()
Expand Down
5 changes: 3 additions & 2 deletions tests/producer/appveyor/appveyor/test_core.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import pytest
import os
import argparse
import os
from typing import get_args

import pytest

from chroma_feedback.producer.appveyor import appveyor
from chroma_feedback.typing import Status

Expand Down
5 changes: 3 additions & 2 deletions tests/producer/atlassian/bitbucket/test_core.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import pytest
import os
import argparse
import os
from typing import get_args

import pytest

from chroma_feedback.producer.atlassian import bitbucket
from chroma_feedback.typing import Status

Expand Down
5 changes: 3 additions & 2 deletions tests/producer/buddy/buddy/test_core.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import pytest
import os
import argparse
import os
from typing import get_args

import pytest

from chroma_feedback.producer.buddy import buddy
from chroma_feedback.typing import Status

Expand Down
5 changes: 3 additions & 2 deletions tests/producer/circle/circle/test_core.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import pytest
import os
import argparse
import os
from typing import get_args

import pytest

from chroma_feedback.producer.circle import circle
from chroma_feedback.typing import Status

Expand Down
5 changes: 3 additions & 2 deletions tests/producer/cloudbees/codeship/test_core.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import pytest
import os
import argparse
import os
from typing import get_args

import pytest

from chroma_feedback.producer.cloudbees import codeship
from chroma_feedback.typing import Status

Expand Down
5 changes: 3 additions & 2 deletions tests/producer/gitlab/gitlab/test_core.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import pytest
import os
import argparse
import os
from typing import get_args

import pytest

from chroma_feedback.producer.gitlab import gitlab
from chroma_feedback.typing import Status

Expand Down
5 changes: 3 additions & 2 deletions tests/producer/heroku/heroku/test_core.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import pytest
import os
import argparse
import os
from typing import get_args

import pytest

from chroma_feedback.producer.heroku import heroku
from chroma_feedback.typing import Status

Expand Down
5 changes: 3 additions & 2 deletions tests/producer/jetbrains/teamcity/test_core.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import pytest
import os
import argparse
import os
from typing import get_args

import pytest

from chroma_feedback.producer.jetbrains import teamcity
from chroma_feedback.typing import Status

Expand Down
Loading

0 comments on commit 4b3f005

Please sign in to comment.