Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move as much setup.cfg to pyproject.toml as possible #112

Merged
merged 1 commit into from Dec 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/linters.yml
Expand Up @@ -14,4 +14,5 @@ jobs:
uses: fizyk/actions-reuse/.github/workflows/linters-python.yml@v1.6.3
with:
pipenv: true
mypy: true
mypy: true
pydocstyle: false
1 change: 0 additions & 1 deletion Pipfile
Expand Up @@ -11,7 +11,6 @@ pytest = "==7.2.0"
pytest-cov = "==4.0.0"
coverage = "==6.5.0"
black = "==22.12.0"
pydocstyle = {version = "==6.1.1", extras = ["toml"]}
pycodestyle = "==2.10.0"
mypy = "==0.991"
tbump = "==6.9.0"
13 changes: 1 addition & 12 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions newsfragments/112.misc.rst
@@ -0,0 +1,2 @@
Moved as much of the setup.cfg settings into the pyproject.toml as possible.
Dropped pydocstyle support.
1 change: 1 addition & 0 deletions port_for/__init__.py
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
"""port_for package."""
__version__ = "0.6.2"

from ._ranges import UNASSIGNED_RANGES
Expand Down
8 changes: 4 additions & 4 deletions port_for/cmd.py
@@ -1,9 +1,8 @@
#!/usr/bin/env python
"""
cmd.py is a command-line utility that
helps with local TCP ports management. It
finds 'good' unused TCP localhost port and
remembers the association.
cmd.py is a command-line utility that helps with local TCP ports management.

It finds 'good' unused TCP localhost port and remembers the association.

Usage:
port-for <NAME>
Expand Down Expand Up @@ -48,6 +47,7 @@ def _unbind(app: str) -> None:


def main() -> None:
"""port-for executable entrypoint."""
args = docopt(
__doc__,
version="port-for %s" % port_for.__version__,
Expand Down
5 changes: 3 additions & 2 deletions port_for/docopt.py
Expand Up @@ -4,12 +4,10 @@


class DocoptLanguageError(Exception):

"""Error in construction of usage-message by developer."""


class DocoptExit(SystemExit):

"""Exit in case user invoked program with incorrect arguments."""

usage = ""
Expand Down Expand Up @@ -447,7 +445,10 @@ def extras(help, version, options, doc):


class Dict(dict):
"""Dictionary with custom repr bbehaviour."""

def __repr__(self):
"""Dictionary representation for docopt."""
return "{%s}" % ",\n ".join("%r: %r" % i for i in sorted(self.items()))


Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Expand Up @@ -49,6 +49,11 @@ packages = ["port_for"]
[tool.setuptools.package-data]
port_for = ["py.typed"]

[tool.pytest.ini_options]
xfail_strict=true
testpaths = "tests"
filterwarnings = "error"

[tool.towncrier]
directory = "newsfragments"
single_file=true
Expand Down
10 changes: 0 additions & 10 deletions setup.cfg
@@ -1,13 +1,3 @@
[pycodestyle]
max-line-length = 80
exclude = docs/*,build/*,venv/*

[pydocstyle]
ignore = D203,D212
match = '(?!docs|build|venv).*\.py'

[tool:pytest]
addopts = -vvv --capture=no --showlocals
testpaths = tests/
filterwarnings = error
xfail_strict = True