From 89afe5ae45e1ba279af0803f0abb6cfa6da92640 Mon Sep 17 00:00:00 2001 From: "ukmo-chris.bunney" Date: Tue, 19 Nov 2024 12:58:34 +0000 Subject: [PATCH] Roll back changes to _antlr4_runtime and add .pre-commit exclusion for this directory --- .pre-commit-config.yaml | 3 +++ cf_units/_udunits2_parser/_antlr4_runtime/Recognizer.py | 2 +- cf_units/_udunits2_parser/_antlr4_runtime/_antlr4_version.txt | 2 +- .../_udunits2_parser/_antlr4_runtime/error/ErrorStrategy.py | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4e5dc639..d0645d33 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,6 +6,9 @@ ci: autofix_prs: false autoupdate_commit_msg: "chore: update pre-commit hooks" +exclude: 'cf_units/_udunits2_parser/_antlr4_runtime/' + + repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 diff --git a/cf_units/_udunits2_parser/_antlr4_runtime/Recognizer.py b/cf_units/_udunits2_parser/_antlr4_runtime/Recognizer.py index 0a7f62ad..f827ec86 100644 --- a/cf_units/_udunits2_parser/_antlr4_runtime/Recognizer.py +++ b/cf_units/_udunits2_parser/_antlr4_runtime/Recognizer.py @@ -7,7 +7,7 @@ from .RuleContext import RuleContext from .Token import Token -# need forward declaration +# need forward delcaration RecognitionException = None diff --git a/cf_units/_udunits2_parser/_antlr4_runtime/_antlr4_version.txt b/cf_units/_udunits2_parser/_antlr4_runtime/_antlr4_version.txt index d782fca8..012d0f05 100644 --- a/cf_units/_udunits2_parser/_antlr4_runtime/_antlr4_version.txt +++ b/cf_units/_udunits2_parser/_antlr4_runtime/_antlr4_version.txt @@ -1 +1 @@ -4.11.1 +4.11.1 \ No newline at end of file diff --git a/cf_units/_udunits2_parser/_antlr4_runtime/error/ErrorStrategy.py b/cf_units/_udunits2_parser/_antlr4_runtime/error/ErrorStrategy.py index 31354c24..642239c2 100644 --- a/cf_units/_udunits2_parser/_antlr4_runtime/error/ErrorStrategy.py +++ b/cf_units/_udunits2_parser/_antlr4_runtime/error/ErrorStrategy.py @@ -212,7 +212,7 @@ def sync(self, recognizer: Parser): s = recognizer._interp.atn.states[recognizer.state] la = recognizer.getTokenStream().LA(1) - # try cheaper subset first; might get lucky. seems to shave a small bit off + # try cheaper subset first; might get lucky. seems to shave a wee bit off nextTokens = recognizer.atn.nextTokens(s) if la in nextTokens: self.nextTokensContext = None