Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/test-build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- uses: actions/setup-python@v5
with:
python-version: '3.7'
- name: Install dependencies
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/test-esp-bool-parser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Test ESP bool parser

on:
pull_request:
paths:
- 'esp_bool_parser/**'
push:
branches:
- main
Expand All @@ -17,7 +15,7 @@ defaults:

jobs:
build-python-packages:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -33,14 +31,17 @@ jobs:
name: wheel
path: dist/esp_bool_parser-*.whl


basic-testest:
runs-on: ubuntu-latest
basic-test:
needs: build-python-packages
runs-on: ubuntu-22.04
env:
FLIT_ROOT_INSTALL: 1
steps:
- uses: actions/checkout@v4
- name: Build the Apps
- uses: actions/setup-python@v5
with:
python-version: '3.7'
- name: Run tests
run: |
pip install flit
flit install -s
Expand Down
7 changes: 0 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,8 @@ repos:
- id: mypy
args: ['--warn-unused-ignores']
additional_dependencies:
- pydantic<2.6
- pydantic-settings
- packaging
- toml
- pyparsing
- types-PyYAML
- types-toml
- pytest
- argcomplete>=3
- repo: https://github.com/hfudev/rstfmt
rev: v0.1.4
hooks:
Expand Down
10 changes: 8 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version, and other tools you might need
build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: "3.7"
python: "3.13"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/en/conf.py

python:
install:
Expand Down
4 changes: 2 additions & 2 deletions esp_bool_parser/bool_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class ChipAttr(Stmt):
- CONFIG_NAME: config name defined in the config rules
"""

addition_attr: t.Dict[str, t.Callable] = {}
addition_attr: t.ClassVar[t.Dict[str, t.Callable]] = {}

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


class BoolStmt(Stmt):
_OP_DICT = {
_OP_DICT: t.ClassVar[t.Dict[str, t.Callable[..., bool]]] = {
'==': operator.eq,
'!=': operator.ne,
'>': operator.gt,
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ select = [
'RUF', # Ruff-specific rules
]
ignore = [
# Mutable class attributes should be annotated with `typing.ClassVar`, pydantic model is an exception
'RUF012',
# `open` and `read` should be replaced by `Path(f).read_text()`
'FURB101',
]
Expand All @@ -146,3 +144,4 @@ docstring-code-format = true

[tool.mypy]
python_version = "3.8"
follow_untyped_imports = true