From d241a9a0e743ff66a2961603dd44f398fb683885 Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Mon, 17 Jun 2024 04:22:57 +0800 Subject: chore(format): ruff lint code --- examples/BRP/src/character.py | 10 ++++------ hydro_roll_core/__init__.py | 2 +- hydro_roll_core/cli.py | 3 ++- hydro_roll_core/development/character.py | 3 +-- hydro_roll_core/libcore.pyi | 4 +--- tests/test_corelib.py | 4 +++- 6 files changed, 12 insertions(+), 14 deletions(-) diff --git a/examples/BRP/src/character.py b/examples/BRP/src/character.py index 54503eb..9b52aa3 100644 --- a/examples/BRP/src/character.py +++ b/examples/BRP/src/character.py @@ -2,6 +2,7 @@ import inspect from hydro_roll_core.development import Character from typing import Literal, List, Tuple, Union, Dict, Generic, Optional, TYPE_CHECKING + class Identity: """ 身份 @@ -613,16 +614,13 @@ class Skills: """ -class Weapons: - ... +class Weapons: ... -class Armor: - ... +class Armor: ... -class Equipment: - ... +class Equipment: ... class BRPCharacter(Character): diff --git a/hydro_roll_core/__init__.py b/hydro_roll_core/__init__.py index 733271d..1bd4ab1 100644 --- a/hydro_roll_core/__init__.py +++ b/hydro_roll_core/__init__.py @@ -1 +1 @@ -from .libcore import * \ No newline at end of file +from .libcore import * diff --git a/hydro_roll_core/cli.py b/hydro_roll_core/cli.py index ac66296..55758bc 100644 --- a/hydro_roll_core/cli.py +++ b/hydro_roll_core/cli.py @@ -1,5 +1,6 @@ import argparse + class Cli(object): parser = argparse.ArgumentParser(description="水系核心终端") @@ -42,4 +43,4 @@ class Cli(object): return self.args def get_help(self): - return self.parser.format_help() \ No newline at end of file + return self.parser.format_help() diff --git a/hydro_roll_core/development/character.py b/hydro_roll_core/development/character.py index 63ed7dc..c883e45 100644 --- a/hydro_roll_core/development/character.py +++ b/hydro_roll_core/development/character.py @@ -1,3 +1,2 @@ class Character: - class Attribute: - ... + class Attribute: ... diff --git a/hydro_roll_core/libcore.pyi b/hydro_roll_core/libcore.pyi index d852171..09cfc3d 100644 --- a/hydro_roll_core/libcore.pyi +++ b/hydro_roll_core/libcore.pyi @@ -2,6 +2,4 @@ class libcore(object): """Core library for hydro roll""" def __init__(self, name: str = ""): ... - - def process_rule_pack(self, rule_pack: str) -> str: - ... + def process_rule_pack(self, rule_pack: str) -> str: ... diff --git a/tests/test_corelib.py b/tests/test_corelib.py index 4a21e29..38c2ef9 100644 --- a/tests/test_corelib.py +++ b/tests/test_corelib.py @@ -2,6 +2,7 @@ from hydro_roll_core import libcore cb = libcore + def main(): rule_pack = "example_rule_pack" result = cb.process_rule_pack(rule_pack) @@ -10,5 +11,6 @@ def main(): cb.name = "a" print(cb.name) + if __name__ == "__main__": - main() \ No newline at end of file + main() -- cgit v1.2.3-70-g09d2