Repository: ClearcodeHQ/pytest-mysql (language: python)

Issue:
merge setup.cfg into pyproject.toml



Discussion / hints:

Fix patch:
diff --git a/newsfragments/399.misc.rst b/newsfragments/399.misc.rst
new file mode 100644
index 00000000..00203dfd
--- /dev/null
+++ b/newsfragments/399.misc.rst
@@ -0,0 +1,1 @@
+Move most of the package definition to pyproject.toml
\ No newline at end of file
diff --git a/pyproject.toml b/pyproject.toml
index c91dcac0..0bc73399 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,13 +1,69 @@
+[project]
+name = "pytest-mysql"
+version = "2.3.1"
+description = "MySQL process and client fixtures for pytest"
+readme = "README.rst"
+keywords = ["tests", "pytest", "fixture", "mysql"]
+license = {file = "LICENSE"}
+authors = [
+    {name = "Grzegorz Śliwiński", email = "fizyk+pypi@fizyk.dev"}
+]
+classifiers = [
+    "Development Status :: 5 - Production/Stable",
+    "Environment :: Web Environment",
+    "Intended Audience :: Developers",
+    "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
+    "Natural Language :: English",
+    "Operating System :: OS Independent",
+    "Programming Language :: Python",
+    "Programming Language :: Python :: 3",
+    "Programming Language :: Python :: 3.8",
+    "Programming Language :: Python :: 3.9",
+    "Programming Language :: Python :: 3.10",
+    "Programming Language :: Python :: 3.11",
+    "Programming Language :: Python :: 3 :: Only",
+    "Topic :: Software Development :: Libraries :: Python Modules",
+    "Topic :: Software Development :: Testing",
+    "Framework :: Pytest",
+]
+dependencies = [
+    "pytest >= 6.2",
+    "port-for >= 0.6.0",
+    "mirakuru",
+    "mysqlclient",
+]
+requires-python = ">= 3.7"
+
+[project.urls]
+"Source" = "https://github.com/ClearcodeHQ/pytest-mysql"
+"Bug Tracker" = "https://github.com/ClearcodeHQ/pytest-mysql/issues"
+"Changelog" = "https://github.com/ClearcodeHQ/pytest-mysql/blob/v2.3.1/CHANGES.rst"
+
+[project.entry-points."pytest11"]
+pytest_mysql = "pytest_mysql.plugin"
+
 [build-system]
-requires = ["setuptools >= 40.6.0", "wheel"]
+requires = ["setuptools >= 61.0.0", "wheel"]
 build-backend = "setuptools.build_meta"
 
+[tool.setuptools]
+zip-safe = true
+packages = ["pytest_mysql"]
+
+[tool.pytest.ini_options]
+xfail_strict=true
+addopts = "--max-worker-restart=0 --showlocals --verbose --cov"
+testpaths = "tests"
+mysql_dbname = "pytestmysql"
+
+[tool.pydocstyle]
+ignore = "D203,D212"
+
 [tool.black]
 line-length = 80
 target-version = ['py39']
 include = '.*\.pyi?$'
 
-
 [tool.towncrier]
 directory = "newsfragments"
 single_file=true
diff --git a/setup.cfg b/setup.cfg
index e8736d08..2627357a 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,63 +1,3 @@
-[metadata]
-name = pytest-mysql
-version = 2.3.1
-url = https://github.com/ClearcodeHQ/pytest-mysql
-description = MySQL process and client fixtures for pytest
-long_description = file: README.rst, CHANGES.rst
-long_description_content_type = text/x-rst
-keywords = tests, py.test, pytest, fixture, mysql
-license = LGPLv3+
-maintainer = Grzegorz Śliwiński
-maintainer_email = fizyk+pypi@fizyk.net.pl
-classifiers =
-    Development Status :: 5 - Production/Stable
-    Environment :: Web Environment
-    Intended Audience :: Developers
-    License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
-    Natural Language :: English
-    Operating System :: OS Independent
-    Programming Language :: Python
-    Programming Language :: Python :: 3
-    Programming Language :: Python :: 3.7
-    Programming Language :: Python :: 3.8
-    Programming Language :: Python :: 3.9
-    Programming Language :: Python :: 3.10
-    Programming Language :: Python :: 3.11
-    Programming Language :: Python :: 3 :: Only
-    Topic :: Software Development :: Libraries :: Python Modules
-    Topic :: Software Development :: Testing
-    Framework :: Pytest
-
-[options]
-zip_safe = False
-include_package_data = True
-python_requires = >= 3.7
-packages = pytest_mysql
-install_requires =
-    pytest >= 6.2
-    port-for >= 0.6.0
-    mirakuru
-    mysqlclient
-
-[options.entry_points]
-pytest11 =
-    pytest_mysql = pytest_mysql.plugin
-
-[options.extras_require]
-tests =
-    pytest-cov
-    pytest-xdist
-
 [pycodestyle]
 max-line-length = 80
 exclude = docs/*,build/*,venv/*
-
-[pydocstyle]
-ignore = D203,D212
-match = '(?!docs|build|venv).*\.py'
-
-[tool:pytest]
-addopts = --max-worker-restart=0 --showlocals --verbose --cov src/pytest_mysql --cov tests
-mysql_dbname = pytestmysql
-testpaths = tests
-xfail_strict = true


Test patch:
diff --git a/pytest_mysql/config.py b/pytest_mysql/config.py
index f9a3595a..829e5f5e 100644
--- a/pytest_mysql/config.py
+++ b/pytest_mysql/config.py
@@ -1,3 +1,6 @@
+"""Config module."""
+
+
 def get_config(request):
     """Return a dictionary with config options."""
     config = {}
diff --git a/pytest_mysql/exceptions.py b/pytest_mysql/exceptions.py
index ebe9d136..57a768b8 100644
--- a/pytest_mysql/exceptions.py
+++ b/pytest_mysql/exceptions.py
@@ -1,5 +1,8 @@
+"""Pytest MySQL's exceptions."""
+
+
 class PytestMySQLException(Exception):
-    """Base plguin's exceptions"""
+    """Base plguin's exceptions."""
 
 
 class MySQLUnsupported(PytestMySQLException):
@@ -15,4 +18,4 @@ def __init__(self, output):
 
 
 class DatabaseExists(PytestMySQLException):
-    """Raise this exception, when the database already exists"""
+    """Raise this exception, when the database already exists."""
diff --git a/pytest_mysql/executor_noop.py b/pytest_mysql/executor_noop.py
index 4dafa304..2cc57c0e 100644
--- a/pytest_mysql/executor_noop.py
+++ b/pytest_mysql/executor_noop.py
@@ -1,10 +1,20 @@
+"""Module containing Noop executor."""
+
+
 class NoopMySQLExecutor:
+    """
+    Noop Executor.
+
+    Used to mimic in necessary scope the MySQL executor inside fixtures.
+    """
+
     def __init__(
         self,
         user,
         host,
         port,
     ):
+        """Initialize NoopMySQLExecutor."""
         self.user = user
         self.host = host
         self.port = port
@@ -15,9 +25,9 @@ def running(self):
         return True
 
     def __enter__(self):
-        """Dummy enter method."""
+        """Do nothing enter method."""
         pass
 
     def __exit__(self, *args, **kwargs):
-        """Dummy exit method."""
+        """Do nothing exit method."""
         pass