From 34b552176a7ac6e3b9679b8eb223dde33b69eaff Mon Sep 17 00:00:00 2001 From: sonny Date: Sat, 3 May 2025 14:12:29 +0200 Subject: [PATCH 1/2] Add editorconfig configuration --- .editorconfig | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..f90eb56 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,25 @@ +# https://editorconfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +trim_trailing_whitespace = true + +[*.py] +indent_style = space +indent_size = 4 + +[*.{yaml,yml,toml,md}] +indent_style = space +indent_size = 2 + +[Dockerfile*] +indent_style = space +indent_size = 4 + +[*.json] +indent_style = space +indent_size = 4 From c8214d447dced1d743ef363eced5bf0d5fc7c3fb Mon Sep 17 00:00:00 2001 From: sonny Date: Sat, 3 May 2025 14:12:57 +0200 Subject: [PATCH 2/2] Move coverage configuration to pyproject.toml --- .coveragerc | 9 -------- pyproject.toml | 56 ++++++++++++++++++++++++++++---------------------- 2 files changed, 32 insertions(+), 33 deletions(-) delete mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 5e8d914..0000000 --- a/.coveragerc +++ /dev/null @@ -1,9 +0,0 @@ -[run] -source = ./transip_client/ -omit = - **/tests/** - **/tests.py - **/__init__.py - -[html] -directory = coverage diff --git a/pyproject.toml b/pyproject.toml index 1decd67..17f3192 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,34 +1,34 @@ [project] -name = 'transip_client' -version = '0.5.0' -description = 'Listens for changes about the current public IP and acts upon it.' -authors = [{name = 'Sonny', email= 'sonnyba871@gmail.com'}] -license = {text = 'GPL-3.0'} -requires-python = '>=3.11' +name = "transip_client" +version = "0.5.0" +description = "Listens for changes about the current public IP and acts upon it." +authors = [{name = "Sonny", email= "sonnyba871@gmail.com"}] +license = {text = "GPL-3.0"} +requires-python = ">=3.11" dependencies = [ - 'click>=8.0.1', - 'python-dotenv>=0.15.0', - 'requests>=2.25.1', - 'cryptography>=3.4.7', + "click>=8.0.1", + "python-dotenv>=0.15.0", + "requests>=2.25.1", + "cryptography>=3.4.7", "ruamel-yaml>=0.18.10", ] [dependency-groups] -dev = ['ruff>=0.8.6'] -ci = ['coverage>=5.3.1'] +dev = ["ruff>=0.8.6"] +ci = ["coverage>=5.3.1"] [project.optional-dependencies] -sentry-enabled = ['sentry_sdk>=0.19.5'] +sentry-enabled = ["sentry_sdk>=0.19.5"] [tool.setuptools.packages] -find = {include = ['transip_client']} +find = {include = ["transip_client"]} [project.scripts] -transip-listen = 'transip_client.cli:run' +transip-listen = "transip_client.cli:run" [build-system] -requires = ['setuptools'] -build-backend = 'setuptools.build_meta' +requires = ["setuptools"] +build-backend = "setuptools.build_meta" [tool.uv] environments = ["sys_platform == 'linux'"] @@ -40,12 +40,20 @@ select = ["E4", "E7", "E9", "F", "I"] lines-between-types=1 lines-after-imports=2 -default-section = 'third-party' -known-first-party = ['transip_client'] +default-section = "third-party" +known-first-party = ["transip_client"] section-order = [ - 'future', - 'standard-library', - 'third-party', - 'first-party', - 'local-folder', + "future", + "standard-library", + "third-party", + "first-party", + "local-folder", +] + +[tool.coverage.run] +source = ./transip_client/ +omit = [ + "**/tests/**", + "**/tests.py", + "**/__init__.py" ]