Skip to content

Commit

Permalink
review actions
Browse files Browse the repository at this point in the history
  • Loading branch information
rcomer committed Feb 26, 2024
1 parent fb18212 commit acb79fb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 1 addition & 2 deletions cf_units/_udunits2_parser/parser/udunits2ParserVisitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
else:
from udunits2Parser import udunits2Parser

# This class defines a complete generic visitor for a parse tree produced by
# udunits2Parser.
# This class defines a complete generic visitor for a parse tree produced by udunits2Parser.


class udunits2ParserVisitor(ParseTreeVisitor):
Expand Down
4 changes: 2 additions & 2 deletions cf_units/tests/integration/parse/test_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def test_known_issues(_, unit_str, expected):
# These are the cases that don't work yet but which do work with udunits.

# Make sure udunits can read it.
cf_units.Unit(unit_str).symbol # noqa: B018
_ = cf_units.Unit(unit_str).symbol

if isinstance(expected, type) and issubclass(expected, Exception):
with pytest.raises(SyntaxError):
Expand Down Expand Up @@ -293,7 +293,7 @@ def test_invalid_syntax_units(_, unit_str):
# allowed with our grammar.

with pytest.raises(ValueError):
cf_units.Unit(unit_str).symbol # noqa: B018
_ = cf_units.Unit(unit_str).symbol

with pytest.raises(SyntaxError):
normalize(unit_str)
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,7 @@ max-complexity = 22

[tool.ruff.pydocstyle]
convention = "numpy"

[tool.ruff.per-file-ignores]
# Allow the longer comment lines that the generated code produces.
"cf_units/_udunits2_parser/parser/*.py" = ["E501"]

0 comments on commit acb79fb

Please sign in to comment.