xonsh / xontrib-jupyter

Xonsh jupyter kernel allows to run Xonsh shell code in Jupyter, JupyterLab, Euporia, etc.
MIT License
32 stars 4 forks source link

Fix code style errors #38

Open anki-code opened 1 month ago

anki-code commented 1 month ago

From https://results.pre-commit.ci/run/github/471969357/1720041589.abHns_7JRguzMEFrN9AjWQ:

tests/test_xonfig.py:36:89: E501 Line too long (94 > 88)
tests/test_xonfig.py:41:9: SIM102 Use a single `if` statement instead of nested `if` statements
tests/test_xonfig.py:67:9: RUF100 [*] Unused blanket `noqa` directive
tests/test_xonfig.py:90:30: SIM115 Use context handler for opening files
tests/test_xonfig.py:112:12: SIM300 [*] Yoda conditions are discouraged, use `cap_args["args"][2] == "xonsh"` instead
xonsh_jupyter/alias.py:54:17: UP032 [*] Use f-string instead of `format` call
xonsh_jupyter/kernel.py:57:21: RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
xonsh_jupyter/kernel.py:65:25: RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
xonsh_jupyter/kernel.py:199:68: B026 Star-arg unpacking after a keyword argument is strongly discouraged
xonsh_jupyter/kernel.py:240:17: RUF005 Consider `[DELIM, signature, *messages]` instead of concatenation
xonsh_jupyter/kernel.py:378:12: SIM300 [*] Yoda conditions are discouraged, use `rtn > 0` instead

For community

⬇️ Please click the 👍 reaction instead of leaving a +1 or 👍 comment