Skip to content

Commit

Permalink
Move flake8 config to pyproject.toml and replace pytest-watch with py…
Browse files Browse the repository at this point in the history
…test-watcher
  • Loading branch information
tdg5 committed Apr 4, 2024
1 parent 7633b85 commit 9c1cf36
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ repos:
name: black
language: system
entry: black
args: ["service_oriented", "service_oriented_test"]
args: ["--preview"]
types: [python]
- id: flake8
name: flake8
language: python
entry: flake8
entry: flake8p
args: ["service_oriented", "service_oriented_test"]
types: [python]
additional_dependencies:
Expand Down
17 changes: 11 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
[build-system]
requires = ["setuptools>=69"]
build-backend = "setuptools.build_meta"

[tool.pytest.ini_options]
markers = ["integration_test: marks tests as integration tests (deselect with '-m \"not integration_test\")"]
requires = ["setuptools>=69"]

[tool.black]
include = "service_oriented(_test)?/.*\\.py$"
line-length = 88
target-version = ["py39"]
include = "service_oriented(_test)?/.*\\.py$"

[tool.flake8]
ignore = ["E203", "E251", "E701", "N805", "W503", "DAR101", "DAR201", "DAR301", "DAR401"]
max-line-length = 88
min_python_version = "3.10.0"

[tool.isort]
include_trailing_comma = true
Expand All @@ -17,7 +19,7 @@ line_length = 88
lines_after_imports = 2
multi_line_output = 3
profile = "black"
sections = ["FUTURE","STDLIB","THIRDPARTY","FIRSTPARTY","LOCALFOLDER"]
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
use_parentheses = true

[tool.mypy]
Expand All @@ -33,3 +35,6 @@ warn_unused_ignores = true

[tool.pydantic-mypy]
init_forbid_extra = true

[tool.pytest.ini_options]
markers = ["integration_test: marks tests as integration tests (deselect with '-m \"not integration_test\"')"]
10 changes: 3 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
annotated-types==0.6.0
appdirs==1.4.4
attrs==23.2.0
black==23.12.1
black==24.2.0
build==1.0.3
certifi==2023.11.17
cffi==1.16.0
cfgv==3.4.0
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
coverage==7.4.4
coverage-badge==1.1.0
cryptography==42.0.5
distlib==0.3.8
dlint==0.14.1
docopt==0.6.2
docutils==0.20.1
dparse==0.6.3
eradicate==2.3.0
Expand All @@ -23,6 +20,7 @@ filelock==3.13.1
flake8==7.0.0
flake8-comprehensions==3.14.0
flake8-eradicate==1.5.0
Flake8-pyproject==1.2.3
flake8-spellcheck==0.28.0
flake8-typing-imports==1.15.0
identify==2.5.33
Expand Down Expand Up @@ -55,16 +53,14 @@ pydantic-settings==2.1.0
pydantic_core==2.14.6
pyflakes==3.2.0
Pygments==2.17.2
pyparsing==3.1.1
pyproject_hooks==1.0.0
pytest==7.4.4
pytest-mock==3.12.0
pytest-watch==4.2.0
pytest-watcher==0.4.2
python-dotenv==1.0.0
python-json-logger==2.0.7
PyYAML==6.0.1
readme-renderer==42.0
regex==2023.12.25
requests==2.31.0
requests-toolbelt==1.0.0
rfc3986==2.0.0
Expand Down
4 changes: 2 additions & 2 deletions service_oriented/application/entry_point_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

class _EntryPointClass(Protocol[P]):
def __init__(self, config: C, *args: P.args, **kwargs: P.kwargs) -> None:
... # pragma: no cover
pass # pragma: no cover

def run(self) -> None:
... # pragma: no cover
pass # pragma: no cover


class EntryPointSpec:
Expand Down
4 changes: 0 additions & 4 deletions setup.cfg

This file was deleted.

35 changes: 18 additions & 17 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,33 @@
VERSION = f.read().strip()

_dependencies = [
"PyYaml~=6.0.1",
"pydantic-settings~=2.1.0",
"pydantic~=2.5.3",
"python-json-logger==2.0.7",
"pyyaml~=6.0.1",
]

_dev_dependencies = [
"black~=23.12.1",
"build==1.0.3",
"coverage==7.4.4",
"coverage-badge==1.1.0",
"dlint==0.14.1",
"flake8-comprehensions==3.14.0",
"flake8-eradicate==1.5.0",
"flake8-spellcheck==0.28.0",
"flake8-typing-imports==1.15.0",
"flake8==7.0.0",
"isort==5.13.2",
"black~=24.2.0",
"build~=1.0.3",
"coverage-badge~=1.1.0",
"coverage~=7.4.4",
"dlint~=0.14.1",
"flake8-comprehensions~=3.14.0",
"flake8-eradicate~=1.5.0",
"flake8-pyproject~=1.2.3",
"flake8-spellcheck~=0.28.0",
"flake8-typing-imports~=1.15.0",
"flake8~=7.0.0",
"isort~=5.13.2",
"mypy~=1.8.0",
"pep8-naming==0.13.3",
"pre-commit==3.6.0",
"pep8-naming~=0.13.3",
"pre-commit~=3.6.0",
"pytest-mock~=3.12.0",
"pytest-watch~=4.2.0",
"pytest-watcher~=0.4.2",
"pytest~=7.4.0",
"safety==2.3.4",
"twine==4.0.2",
"safety~=2.3.4",
"twine~=4.0.2",
"wheel>=0.42.0",
]

Expand Down

0 comments on commit 9c1cf36

Please sign in to comment.