Skip to content

Commit 9f99d98

Browse files
authored
Merge pull request #18 from espressif/fix/small-fixes
Fix/small fixes
2 parents c0a5019 + c283f17 commit 9f99d98

File tree

6 files changed

+20
-22
lines changed

6 files changed

+20
-22
lines changed

.github/workflows/test-build-docs.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ jobs:
88
runs-on: ubuntu-22.04
99
steps:
1010
- uses: actions/checkout@v4
11-
- name: Set up Python
12-
uses: actions/setup-python@v5
11+
- uses: actions/setup-python@v5
1312
with:
1413
python-version: '3.7'
1514
- name: Install dependencies

.github/workflows/test-esp-bool-parser.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: Test ESP bool parser
22

33
on:
44
pull_request:
5-
paths:
6-
- 'esp_bool_parser/**'
75
push:
86
branches:
97
- main
@@ -17,7 +15,7 @@ defaults:
1715

1816
jobs:
1917
build-python-packages:
20-
runs-on: ubuntu-latest
18+
runs-on: ubuntu-22.04
2119
steps:
2220
- uses: actions/checkout@v4
2321
- uses: actions/setup-python@v5
@@ -33,14 +31,17 @@ jobs:
3331
name: wheel
3432
path: dist/esp_bool_parser-*.whl
3533

36-
37-
basic-testest:
38-
runs-on: ubuntu-latest
34+
basic-test:
35+
needs: build-python-packages
36+
runs-on: ubuntu-22.04
3937
env:
4038
FLIT_ROOT_INSTALL: 1
4139
steps:
4240
- uses: actions/checkout@v4
43-
- name: Build the Apps
41+
- uses: actions/setup-python@v5
42+
with:
43+
python-version: '3.7'
44+
- name: Run tests
4445
run: |
4546
pip install flit
4647
flit install -s

.pre-commit-config.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,8 @@ repos:
2828
- id: mypy
2929
args: ['--warn-unused-ignores']
3030
additional_dependencies:
31-
- pydantic<2.6
32-
- pydantic-settings
33-
- packaging
34-
- toml
3531
- pyparsing
36-
- types-PyYAML
37-
- types-toml
3832
- pytest
39-
- argcomplete>=3
4033
- repo: https://github.com/hfudev/rstfmt
4134
rev: v0.1.4
4235
hooks:

.readthedocs.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,18 @@
22
# Read the Docs configuration file
33
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
44

5+
# Required
56
version: 2
67

8+
# Set the OS, Python version, and other tools you might need
79
build:
8-
os: ubuntu-22.04
10+
os: ubuntu-24.04
911
tools:
10-
python: "3.7"
12+
python: "3.13"
13+
14+
# Build documentation in the "docs/" directory with Sphinx
15+
sphinx:
16+
configuration: docs/en/conf.py
1117

1218
python:
1319
install:

esp_bool_parser/bool_parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class ChipAttr(Stmt):
6161
- CONFIG_NAME: config name defined in the config rules
6262
"""
6363

64-
addition_attr: t.Dict[str, t.Callable] = {}
64+
addition_attr: t.ClassVar[t.Dict[str, t.Callable]] = {}
6565

6666
def __init__(self, t: ParseResults):
6767
self.attr: str = t[0]
@@ -131,7 +131,7 @@ def get_value(self, target: str, config_name: str) -> t.Any:
131131

132132

133133
class BoolStmt(Stmt):
134-
_OP_DICT = {
134+
_OP_DICT: t.ClassVar[t.Dict[str, t.Callable[..., bool]]] = {
135135
'==': operator.eq,
136136
'!=': operator.ne,
137137
'>': operator.gt,

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,6 @@ select = [
134134
'RUF', # Ruff-specific rules
135135
]
136136
ignore = [
137-
# Mutable class attributes should be annotated with `typing.ClassVar`, pydantic model is an exception
138-
'RUF012',
139137
# `open` and `read` should be replaced by `Path(f).read_text()`
140138
'FURB101',
141139
]
@@ -146,3 +144,4 @@ docstring-code-format = true
146144

147145
[tool.mypy]
148146
python_version = "3.8"
147+
follow_untyped_imports = true

0 commit comments

Comments
 (0)