From 81d8e92f3abd92b3d32ccefd30b035aac292b900 Mon Sep 17 00:00:00 2001 From: Sylvain Hellegouarch Date: Mon, 18 Mar 2024 12:12:01 +0100 Subject: [PATCH] keep ruff only Signed-off-by: Sylvain Hellegouarch --- chaosaddons/__init__.py | 2 +- chaosaddons/controls/bypass.py | 29 ++-- chaosaddons/controls/repeat.py | 39 +++--- chaosaddons/controls/safeguards.py | 215 ++++++++++++++++++++--------- pdm.lock | 114 +-------------- pyproject.toml | 6 +- 6 files changed, 191 insertions(+), 214 deletions(-) diff --git a/chaosaddons/__init__.py b/chaosaddons/__init__.py index 36aa724..c54ff5c 100644 --- a/chaosaddons/__init__.py +++ b/chaosaddons/__init__.py @@ -9,4 +9,4 @@ try: __version__ = version("chaostoolkit-addons") except PackageNotFoundError: # pragma: no cover - __version__ = 'unknown' + __version__ = "unknown" diff --git a/chaosaddons/controls/bypass.py b/chaosaddons/controls/bypass.py index d32394c..6948065 100644 --- a/chaosaddons/controls/bypass.py +++ b/chaosaddons/controls/bypass.py @@ -46,25 +46,33 @@ from chaoslib.types import Activity -__all__ = ["before_experiment_control", "before_activity_control", - "after_activity_control"] +__all__ = [ + "before_experiment_control", + "before_activity_control", + "after_activity_control", +] logger = logging.getLogger("chaostoolkit") -def before_experiment_control(target_type: str = None, - target_names: List[str] = None, **kwargs): +def before_experiment_control( + target_type: str = None, target_names: List[str] = None, **kwargs +): if target_type: logger.warning( "No '{}' will be executed as configured by the bypass " - "control".format(target_type)) + "control".format(target_type) + ) if target_names: logger.warning( "The following activities will not be executed: {}".format( - ", ".join(target_names))) + ", ".join(target_names) + ) + ) -def before_activity_control(context: Activity, target_type: str = None, - target_names: List[str] = None): +def before_activity_control( + context: Activity, target_type: str = None, target_names: List[str] = None +): """ Sets the `dry` property on the activity so it is not actually executed """ @@ -74,8 +82,9 @@ def before_activity_control(context: Activity, target_type: str = None, context["dry"] = True -def after_activity_control(context: Activity, target_type: str = None, - target_names: List[str] = None): +def after_activity_control( + context: Activity, target_type: str = None, target_names: List[str] = None +): """ Removes the `dry` property that was previously set """ diff --git a/chaosaddons/controls/repeat.py b/chaosaddons/controls/repeat.py index 7269e36..6d87d09 100644 --- a/chaosaddons/controls/repeat.py +++ b/chaosaddons/controls/repeat.py @@ -2,16 +2,19 @@ from copy import deepcopy from typing import List -from chaoslib.types import Activity, Experiment, Run +from chaoslib.types import Activity, Experiment, Run __all__ = ["after_activity_control"] logger = logging.getLogger("chaostoolkit") -def after_activity_control(context: Activity, experiment: Experiment, - state: Run, repeat_count: int = 0, - break_if_previous_iteration_failed: bool = False - ) -> None: +def after_activity_control( + context: Activity, + experiment: Experiment, + state: Run, + repeat_count: int = 0, + break_if_previous_iteration_failed: bool = False, +) -> None: """ Repeat the activity a certain number of times. @@ -72,28 +75,28 @@ def after_activity_control(context: Activity, experiment: Experiment, if break_if_previous_iteration_failed and last_status != "succeeded": logger.debug( "Last iteration failed so stopping our iterations " - f"of '{activity_name}'") + f"of '{activity_name}'" + ) return - hypothesis_activities = experiment.get( - "steady-state-hypothesis", {}).get("probes", []) - repeat_activity( - activity, hypothesis_activities, repeat_count=repeat_count) + hypothesis_activities = experiment.get("steady-state-hypothesis", {}).get( + "probes", [] + ) + repeat_activity(activity, hypothesis_activities, repeat_count=repeat_count) method_activities = experiment.get("method", []) - repeat_activity( - activity, method_activities, repeat_count=repeat_count) + repeat_activity(activity, method_activities, repeat_count=repeat_count) rollback_activities = experiment.get("rollbacks", []) - repeat_activity( - activity, rollback_activities, repeat_count=repeat_count) + repeat_activity(activity, rollback_activities, repeat_count=repeat_count) ############################################################################### # Internals ############################################################################### -def repeat_activity(activity: Activity, activities: List[Activity], - repeat_count: int = 0) -> None: +def repeat_activity( + activity: Activity, activities: List[Activity], repeat_count: int = 0 +) -> None: if not activities: return @@ -102,8 +105,8 @@ def repeat_activity(activity: Activity, activities: List[Activity], for pos, a in enumerate(copy_activities): if a["name"] == activity_name: - for index in range(1, repeat_count+1): + for index in range(1, repeat_count + 1): new_activity = deepcopy(activity) new_activity["iteration_index"] = index - activities.insert(pos+index, new_activity) + activities.insert(pos + index, new_activity) break diff --git a/chaosaddons/controls/safeguards.py b/chaosaddons/controls/safeguards.py index ab5bd87..a8195ef 100644 --- a/chaosaddons/controls/safeguards.py +++ b/chaosaddons/controls/safeguards.py @@ -95,16 +95,29 @@ from chaoslib.control import controls from chaoslib.exceptions import ActivityFailed, InvalidActivity from chaoslib.exit import exit_gracefully -from chaoslib.hypothesis import ensure_hypothesis_tolerance_is_valid, \ - within_tolerance -from chaoslib.types import Configuration, Control, \ - Experiment, Probe, Run, Secrets, Settings +from chaoslib.hypothesis import ( + ensure_hypothesis_tolerance_is_valid, + within_tolerance, +) +from chaoslib.types import ( + Configuration, + Control, + Experiment, + Probe, + Run, + Secrets, + Settings, +) from .synchronization import experiment_finished -__all__ = ["configure_control", "before_experiment_control", - "after_experiment_control", "validate_control"] +__all__ = [ + "configure_control", + "before_experiment_control", + "after_experiment_control", + "validate_control", +] logger = logging.getLogger("chaostoolkit") @@ -158,9 +171,14 @@ def prepare(self, probes: List[Probe]) -> None: self.interrupter = threading.Thread(None, self._wait_interruption) self._setup = True - def run(self, experiment: Experiment, probes: List[Probe], - configuration: Configuration, secrets: Secrets, - settings: Settings) -> None: + def run( + self, + experiment: Experiment, + probes: List[Probe], + configuration: Configuration, + secrets: Secrets, + settings: Settings, + ) -> None: """ Run the guardian safeguards in their own threads. @@ -174,19 +192,33 @@ def run(self, experiment: Experiment, probes: List[Probe], f = None if p.get("frequency"): f = self.repeating.submit( - run_repeatedly, guard=self, experiment=experiment, - probe=p, configuration=configuration, - secrets=secrets, stop_repeating=self.repeating_until) + run_repeatedly, + guard=self, + experiment=experiment, + probe=p, + configuration=configuration, + secrets=secrets, + stop_repeating=self.repeating_until, + ) elif p.get("background"): f = self.once.submit( - run_soon, guard=self, experiment=experiment, - probe=p, configuration=configuration, - secrets=secrets) + run_soon, + guard=self, + experiment=experiment, + probe=p, + configuration=configuration, + secrets=secrets, + ) else: f = self.now.submit( - run_now, guard=self, experiment=experiment, - probe=p, configuration=configuration, - secrets=secrets, done=self.now_all_done) + run_now, + guard=self, + experiment=experiment, + probe=p, + configuration=configuration, + secrets=secrets, + done=self.now_all_done, + ) if f is not None: f.add_done_callback(partial(self._log_finished, probe=p)) @@ -219,7 +251,9 @@ def _wait_interruption(self) -> None: self._interrupted = True logger.critical( "Safeguard '{}' triggered the end of the experiment".format( - self.triggered_by)) + self.triggered_by + ) + ) do_exit = True if do_exit: @@ -236,8 +270,8 @@ def _log_finished(self, f: Future, probe: Probe) -> None: x = f.exception() if x is not None: logger.debug( - "Safeguard '{}' failed: {}".format( - name, str(x)), exc_info=x) + "Safeguard '{}' failed: {}".format(name, str(x)), exc_info=x + ) else: logger.debug("Safeguard '{}' finished normally".format(name)) @@ -271,19 +305,24 @@ def validate_control(control: Control) -> None: validate_probes(probes) -def configure_control(configuration: Configuration = None, - secrets: Secrets = None, settings: Settings = None, - experiment: Experiment = None, - probes: List[Probe] = None) -> None: +def configure_control( + configuration: Configuration = None, + secrets: Secrets = None, + settings: Settings = None, + experiment: Experiment = None, + probes: List[Probe] = None, +) -> None: guardian.prepare(probes) -def before_experiment_control(context: str, - configuration: Configuration = None, - secrets: Secrets = None, - settings: Settings = None, - experiment: Experiment = None, - probes: List[Probe] = None) -> None: +def before_experiment_control( + context: str, + configuration: Configuration = None, + secrets: Secrets = None, + settings: Settings = None, + experiment: Experiment = None, + probes: List[Probe] = None, +) -> None: guardian.run(experiment, probes, configuration, secrets, settings) @@ -294,61 +333,94 @@ def after_experiment_control(**kwargs): ############################################################################### # Internals ############################################################################### -def run_repeatedly(guard: Guardian, experiment: Experiment, probe: Probe, - configuration: Configuration, secrets: Secrets, - stop_repeating: threading.Event) -> None: +def run_repeatedly( + guard: Guardian, + experiment: Experiment, + probe: Probe, + configuration: Configuration, + secrets: Secrets, + stop_repeating: threading.Event, +) -> None: wait_for = probe.get("frequency") while not stop_repeating.is_set(): run = execute_activity( - experiment=experiment, probe=probe, - configuration=configuration, secrets=secrets) + experiment=experiment, + probe=probe, + configuration=configuration, + secrets=secrets, + ) stop_repeating.wait(timeout=wait_for) if not stop_repeating.is_set(): interrupt_experiment_on_unhealthy_probe( - guard, probe, run, configuration, secrets) + guard, probe, run, configuration, secrets + ) -def run_soon(guard: Guardian, experiment: Experiment, probe: Probe, - configuration: Configuration, - secrets: Secrets) -> None: +def run_soon( + guard: Guardian, + experiment: Experiment, + probe: Probe, + configuration: Configuration, + secrets: Secrets, +) -> None: run = execute_activity( - experiment=experiment, probe=probe, - configuration=configuration, secrets=secrets) + experiment=experiment, + probe=probe, + configuration=configuration, + secrets=secrets, + ) interrupt_experiment_on_unhealthy_probe( - guard, probe, run, configuration, secrets) - - -def run_now(guard: Guardian, experiment: Experiment, probe: Probe, - configuration: Configuration, - secrets: Secrets, done: threading.Barrier) -> None: + guard, probe, run, configuration, secrets + ) + + +def run_now( + guard: Guardian, + experiment: Experiment, + probe: Probe, + configuration: Configuration, + secrets: Secrets, + done: threading.Barrier, +) -> None: try: run = execute_activity( - experiment=experiment, probe=probe, - configuration=configuration, secrets=secrets) + experiment=experiment, + probe=probe, + configuration=configuration, + secrets=secrets, + ) finally: done.wait() interrupt_experiment_on_unhealthy_probe( - guard, probe, run, configuration, secrets) + guard, probe, run, configuration, secrets + ) -def interrupt_experiment_on_unhealthy_probe(guard: Guardian, probe: Probe, - run: Run, - configuration: Configuration, - secrets=Secrets) -> None: +def interrupt_experiment_on_unhealthy_probe( + guard: Guardian, + probe: Probe, + run: Run, + configuration: Configuration, + secrets=Secrets, +) -> None: if experiment_finished.is_set(): return tolerance = probe.get("tolerance") checked = within_tolerance( - tolerance, run["output"], configuration=configuration, - secrets=secrets) + tolerance, run["output"], configuration=configuration, secrets=secrets + ) if not checked: guard.interrupt_now(probe["name"], run) -def execute_activity(experiment: Experiment, probe: Probe, - configuration: Configuration, secrets: Secrets) -> Run: +def execute_activity( + experiment: Experiment, + probe: Probe, + configuration: Configuration, + secrets: Secrets, +) -> Run: """ Low-level wrapper around the actual activity provider call to collect some meta data (like duration, start/end time, exceptions...) during @@ -359,10 +431,16 @@ def execute_activity(experiment: Experiment, probe: Probe, probe = lookup_activity(ref) if not probe: raise ActivityFailed( - "could not find referenced activity '{r}'".format(r=ref)) - - with controls(level="activity", experiment=experiment, context=probe, - configuration=configuration, secrets=secrets) as control: + "could not find referenced activity '{r}'".format(r=ref) + ) + + with controls( + level="activity", + experiment=experiment, + context=probe, + configuration=configuration, + secrets=secrets, + ) as control: pauses = probe.get("pauses", {}) pause_before = pauses.get("before") if pause_before: @@ -370,10 +448,7 @@ def execute_activity(experiment: Experiment, probe: Probe, start = datetime.utcnow() - run = { - "activity": probe.copy(), - "output": None - } + run = {"activity": probe.copy(), "output": None} result = None try: @@ -413,11 +488,13 @@ def validate_probes(probes: List[Probe]): if probe["type"] != "probe": raise InvalidActivity( "safeguard control '{}' should be of type 'probe' " - "not '{}'".format(probe['name'], probe['type'])) + "not '{}'".format(probe["name"], probe["type"]) + ) if "tolerance" not in probe: raise InvalidActivity( "safeguard control is invalid as the probe '{}' is " - "missing a tolerance property".format(probe['name'])) + "missing a tolerance property".format(probe["name"]) + ) ensure_hypothesis_tolerance_is_valid(probe["tolerance"]) diff --git a/pdm.lock b/pdm.lock index 88ea07f..5fae1c1 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,47 +5,7 @@ groups = ["default", "dev"] strategy = ["cross_platform", "inherit_metadata"] lock_version = "4.4.1" -content_hash = "sha256:ec54ff3b35d9f2fa6c30ef239114517d6c5f895dfd74f9da0966b3a18744e0d9" - -[[package]] -name = "black" -version = "24.3.0" -requires_python = ">=3.8" -summary = "The uncompromising code formatter." -groups = ["dev"] -dependencies = [ - "click>=8.0.0", - "mypy-extensions>=0.4.3", - "packaging>=22.0", - "pathspec>=0.9.0", - "platformdirs>=2", - "tomli>=1.1.0; python_version < \"3.11\"", - "typing-extensions>=4.0.1; python_version < \"3.11\"", -] -files = [ - {file = "black-24.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7d5e026f8da0322b5662fa7a8e752b3fa2dac1c1cbc213c3d7ff9bdd0ab12395"}, - {file = "black-24.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9f50ea1132e2189d8dff0115ab75b65590a3e97de1e143795adb4ce317934995"}, - {file = "black-24.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e2af80566f43c85f5797365077fb64a393861a3730bd110971ab7a0c94e873e7"}, - {file = "black-24.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:4be5bb28e090456adfc1255e03967fb67ca846a03be7aadf6249096100ee32d0"}, - {file = "black-24.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4f1373a7808a8f135b774039f61d59e4be7eb56b2513d3d2f02a8b9365b8a8a9"}, - {file = "black-24.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:aadf7a02d947936ee418777e0247ea114f78aff0d0959461057cae8a04f20597"}, - {file = "black-24.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65c02e4ea2ae09d16314d30912a58ada9a5c4fdfedf9512d23326128ac08ac3d"}, - {file = "black-24.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:bf21b7b230718a5f08bd32d5e4f1db7fc8788345c8aea1d155fc17852b3410f5"}, - {file = "black-24.3.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:2818cf72dfd5d289e48f37ccfa08b460bf469e67fb7c4abb07edc2e9f16fb63f"}, - {file = "black-24.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:4acf672def7eb1725f41f38bf6bf425c8237248bb0804faa3965c036f7672d11"}, - {file = "black-24.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c7ed6668cbbfcd231fa0dc1b137d3e40c04c7f786e626b405c62bcd5db5857e4"}, - {file = "black-24.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:56f52cfbd3dabe2798d76dbdd299faa046a901041faf2cf33288bc4e6dae57b5"}, - {file = "black-24.3.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:79dcf34b33e38ed1b17434693763301d7ccbd1c5860674a8f871bd15139e7837"}, - {file = "black-24.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e19cb1c6365fd6dc38a6eae2dcb691d7d83935c10215aef8e6c38edee3f77abd"}, - {file = "black-24.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65b76c275e4c1c5ce6e9870911384bff5ca31ab63d19c76811cb1fb162678213"}, - {file = "black-24.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:b5991d523eee14756f3c8d5df5231550ae8993e2286b8014e2fdea7156ed0959"}, - {file = "black-24.3.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c45f8dff244b3c431b36e3224b6be4a127c6aca780853574c00faf99258041eb"}, - {file = "black-24.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:6905238a754ceb7788a73f02b45637d820b2f5478b20fec82ea865e4f5d4d9f7"}, - {file = "black-24.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7de8d330763c66663661a1ffd432274a2f92f07feeddd89ffd085b5744f85e7"}, - {file = "black-24.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:7bb041dca0d784697af4646d3b62ba4a6b028276ae878e53f6b4f74ddd6db99f"}, - {file = "black-24.3.0-py3-none-any.whl", hash = "sha256:41622020d7120e01d377f74249e677039d20e6344ff5851de8a10f11f513bf93"}, - {file = "black-24.3.0.tar.gz", hash = "sha256:a0c9c4a0771afc6919578cec71ce82a3e31e054904e7197deacbc9382671c41f"}, -] +content_hash = "sha256:d340c2cc4b0a31797270d3ddbf5c28b1c7b13351efdbc0e8592d2bbecc8da3e6" [[package]] name = "certifi" @@ -163,27 +123,13 @@ files = [ {file = "charset_normalizer-3.3.2-py3-none-any.whl", hash = "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc"}, ] -[[package]] -name = "click" -version = "8.1.7" -requires_python = ">=3.7" -summary = "Composable command line interface toolkit" -groups = ["dev"] -dependencies = [ - "colorama; platform_system == \"Windows\"", -] -files = [ - {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, - {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, -] - [[package]] name = "colorama" version = "0.4.6" requires_python = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" summary = "Cross-platform colored terminal text." groups = ["default", "dev"] -marker = "sys_platform == \"win32\" or platform_system == \"Windows\"" +marker = "sys_platform == \"win32\"" files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, @@ -364,28 +310,6 @@ files = [ {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, ] -[[package]] -name = "isort" -version = "5.13.2" -requires_python = ">=3.8.0" -summary = "A Python utility / library to sort Python imports." -groups = ["dev"] -files = [ - {file = "isort-5.13.2-py3-none-any.whl", hash = "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6"}, - {file = "isort-5.13.2.tar.gz", hash = "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109"}, -] - -[[package]] -name = "mypy-extensions" -version = "1.0.0" -requires_python = ">=3.5" -summary = "Type system extensions for programs checked with the mypy type checker." -groups = ["dev"] -files = [ - {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, - {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, -] - [[package]] name = "packaging" version = "24.0" @@ -397,28 +321,6 @@ files = [ {file = "packaging-24.0.tar.gz", hash = "sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9"}, ] -[[package]] -name = "pathspec" -version = "0.12.1" -requires_python = ">=3.8" -summary = "Utility library for gitignore style pattern matching of file paths." -groups = ["dev"] -files = [ - {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, - {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, -] - -[[package]] -name = "platformdirs" -version = "4.2.0" -requires_python = ">=3.8" -summary = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -groups = ["dev"] -files = [ - {file = "platformdirs-4.2.0-py3-none-any.whl", hash = "sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068"}, - {file = "platformdirs-4.2.0.tar.gz", hash = "sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768"}, -] - [[package]] name = "pluggy" version = "1.4.0" @@ -604,18 +506,6 @@ files = [ {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] -[[package]] -name = "typing-extensions" -version = "4.10.0" -requires_python = ">=3.8" -summary = "Backported and Experimental Type Hints for Python 3.8+" -groups = ["dev"] -marker = "python_version < \"3.11\"" -files = [ - {file = "typing_extensions-4.10.0-py3-none-any.whl", hash = "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475"}, - {file = "typing_extensions-4.10.0.tar.gz", hash = "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb"}, -] - [[package]] name = "urllib3" version = "2.2.1" diff --git a/pyproject.toml b/pyproject.toml index 4d11ded..ec5a7fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,11 +84,9 @@ dev = [ "coverage>=7.4.4", "pytest-sugar>=1.0.0", "ruff>=0.3.3", - "isort>=5.13.2", - "black>=24.3.0", ] [tool.pdm.scripts] -lint = {composite = ["ruff check chaosaddons/", "isort --check-only --profile black chaosaddons/", "black --check --diff chaosaddons/"]} -format = {composite = ["isort --profile black chaosaddons/", "black chaosaddons/", "ruff check chaosaddons/ --fix"]} +lint = {composite = ["ruff check chaosaddons/"]} +format = {composite = ["ruff format chaosaddons/"]} test = {cmd = "pytest"}