diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..f96172b --- /dev/null +++ b/setup.cfg @@ -0,0 +1,12 @@ +[flake8] +# Use black line length: +max-line-length = 88 +extend-ignore = + # See https://github.com/PyCQA/pycodestyle/issues/373 + E203, E266 + +[isort] +profile = black +multi_line_output = 3 +known_mobase = mobase +sections=FUTURE,STDLIB,THIRDPARTY,MOBASE,FIRSTPARTY,LOCALFOLDER diff --git a/tests/python/test_argument_wrapper.py b/tests/python/test_argument_wrapper.py index 37868e5..e474996 100644 --- a/tests/python/test_argument_wrapper.py +++ b/tests/python/test_argument_wrapper.py @@ -1,6 +1,7 @@ -import mobase import pytest +import mobase + m = pytest.importorskip("mobase_tests.argument_wrapper") diff --git a/tests/python/test_filetree.py b/tests/python/test_filetree.py index 8248bf9..ccd6fc9 100644 --- a/tests/python/test_filetree.py +++ b/tests/python/test_filetree.py @@ -1,6 +1,7 @@ -import mobase import pytest +import mobase + m = pytest.importorskip("mobase_tests.filetree") diff --git a/tests/python/test_functional.py b/tests/python/test_functional.py index a5cb30a..39fa4cb 100644 --- a/tests/python/test_functional.py +++ b/tests/python/test_functional.py @@ -1,11 +1,11 @@ -import mobase import pytest +import mobase + m = pytest.importorskip("mobase_tests.functional") def test_guessed_string(): - # available functions: # - fn_0_arg, fn_1_arg, fn_2_arg # - fn_0_or_1_arg, fn_1_or_2_or_3_arg diff --git a/tests/python/test_guessed_string.py b/tests/python/test_guessed_string.py index 3f335f2..ad04932 100644 --- a/tests/python/test_guessed_string.py +++ b/tests/python/test_guessed_string.py @@ -1,11 +1,11 @@ -import mobase import pytest +import mobase + m = pytest.importorskip("mobase_tests.guessed_string") def test_guessed_string(): - # empty string gs = mobase.GuessedString() diff --git a/tests/python/test_path_wrappers.py b/tests/python/test_path_wrappers.py index 1975656..ee65297 100644 --- a/tests/python/test_path_wrappers.py +++ b/tests/python/test_path_wrappers.py @@ -1,13 +1,13 @@ import sys from pathlib import Path -import mobase import pytest from PyQt6.QtCore import QDir, QFileInfo +import mobase + def test_filepath_wrappers(): - # TBC that this works everywhere version = ".".join(map(str, sys.version_info[:3])) diff --git a/tests/python/test_qt.py b/tests/python/test_qt.py index 004267b..cb35db5 100644 --- a/tests/python/test_qt.py +++ b/tests/python/test_qt.py @@ -50,7 +50,6 @@ def test_qdatetime(): def test_qvariant(): - # Python -> C++ assert m.qvariant_from_none(None) == (True, False) diff --git a/tests/runner/plugins/dummy-game.py b/tests/runner/plugins/dummy-game.py index b11e060..d4fe0bb 100644 --- a/tests/runner/plugins/dummy-game.py +++ b/tests/runner/plugins/dummy-game.py @@ -1,8 +1,9 @@ # -*- encoding: utf-8 -*- -import mobase from PyQt6.QtWidgets import QWidget +import mobase + class DummyModDataChecker(mobase.ModDataChecker): def dataLooksValid( @@ -26,7 +27,6 @@ class DummySaveGameInfo(mobase.SaveGameInfo): # from the C++ side # class DummyGame(mobase.IPluginGame): - _features: dict[type, object] def __init__(self):