InSync

Results 5 comments of InSync

Lua patterns have some interesting features of their own: * %bxy where *`x`* and *`y`* and two distinct characters matches a sequence starts with *`x`* and ends with *`y`* so...

Currently I have this as a workaround: ```py # @cache won't work _seen = set() def _leave_whitespace(element: ParserElement) -> ParserElement: if expression in _seen: return element _seen.add(element) if hasattr(element, 'expr'):...

@ptmcg Thanks. It would be nice if you document methods like this one so that we users know which ones are implementation details and which are not. Also, the method...

Regarding the second task, I'm not sure whether there is anything to work on other than the following meta-configurations: ### `pyproject.toml` https://github.com/pyparsing/pyparsing/blob/2a1a8e8f4beee7fd120c3fdc1a48725b77e263c2/pyproject.toml#L11 https://github.com/pyparsing/pyparsing/blob/2a1a8e8f4beee7fd120c3fdc1a48725b77e263c2/pyproject.toml#L12-L33 ### `.pre-commit-config.yaml` https://github.com/pyparsing/pyparsing/blob/2a1a8e8f4beee7fd120c3fdc1a48725b77e263c2/.pre-commit-config.yaml#L6 ### `.github/workflows/ci.yml` https://github.com/pyparsing/pyparsing/blob/2a1a8e8f4beee7fd120c3fdc1a48725b77e263c2/.github/workflows/ci.yml#L25

`self`-like variables in `__new__` should also be exempted: ```py class C: def __new__(cls): instance = super().__new__(cls) instance._foo = 42 return instance ``` ```shell $ ruff check --select SLF001 foo.py ```...