Skip to content

Commit

Permalink
fmt: adjust to pcf-formating, black/ruff
Browse files Browse the repository at this point in the history
Signed-off-by: Simon A. F. Lund <[email protected]>
  • Loading branch information
safl committed Oct 29, 2024
1 parent 4813cc5 commit e20f732
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions auxi/gen_entity_index.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
from jinja2 import BaseLoader, Environment

from yace.model import Model

TEMPLATE = """\
Expand Down
9 changes: 8 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@
]

autodoc_default_options = {
"exclude-members": "__weakref__, model_construct, model_dump, model_dump_json, model_copy, model_json_schema",
"exclude-members": (
"__weakref__, "
"model_construct, "
"model_dump, "
"model_dump_json, "
"model_copy, "
"model_json_schema"
)
}

gtagjs_ids = [
Expand Down
3 changes: 2 additions & 1 deletion src/yace/idl/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ def from_cursor(cls, cursor):
brief_description = lines[0].strip()
data["brief"] = brief_description

# Extract full description (everything after the first line, before any tag like @param/@return)
# Extract full description (everything after the first line,
# before any tag like @param/@return
description_lines = []
for line in lines[1:]:
if line.strip().startswith("@"):
Expand Down
1 change: 0 additions & 1 deletion src/yace/idl/directives.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
For directives, currently just a placeholder for #include
"""


from yace.idl.base import Entity


Expand Down
1 change: 1 addition & 0 deletions src/yace/targets/collector.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Collect compiler-targets from the current workdir
"""

import inspect
import typing
from importlib.machinery import SourceFileLoader
Expand Down
1 change: 1 addition & 0 deletions src/yace/targets/ctypes/ctypes_sugar.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
Copyright (c) 2023 Simon A. F. Lund <[email protected]>
SPDX-License-Identifier: BSD-3-Clause
"""

import ctypes
import ctypes.util
import os
Expand Down
1 change: 1 addition & 0 deletions src/yace/targets/ctypes/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
ignores them, except for the special-case "c_char_p".
"""

import copy
import logging as log
import shutil
Expand Down
1 change: 1 addition & 0 deletions src/yace/targets/target.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
"""

import os
from abc import ABC, abstractmethod

Expand Down
1 change: 1 addition & 0 deletions src/yace/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
...
"""

import logging as log
import typing
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions src/yace/transformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
Also, at the IDL-level, then coding-conventions such as CamelCase can be
shared by multiple targets.
"""

from yace.emitters import camelcase
from yace.idl.derivedtypes import Struct, Union
from yace.model import ModelWalker
Expand Down
1 change: 1 addition & 0 deletions tests/test_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from pathlib import Path

import pytest

from yace.compiler import Compiler

VALID = [
Expand Down
1 change: 1 addition & 0 deletions tests/test_emitter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from yace.emitters import camelcase

SNAKECASE = ["foo", "foo_bar", "foo_bar_baz"]
Expand Down

0 comments on commit e20f732

Please sign in to comment.