Skip to content

Commit

Permalink
fix pylint and mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
craigbarratt committed Jul 8, 2024
1 parent 26a67c3 commit f3f0b02
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion custom_components/pyscript/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -1293,7 +1293,7 @@ async def ast_try(self, arg):
for arg1 in arg.finalbody:
val = await self.aeval(arg1)
if isinstance(val, EvalStopFlow):
return val # pylint: disable=lost-exception
return val # pylint: disable=lost-exception,return-in-finally
return None

async def ast_raise(self, arg):
Expand Down
1 change: 1 addition & 0 deletions custom_components/pyscript/jupyter_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ async def shell_handler(self, shell_socket, wire_msg):
"code": msg["content"]["code"],
}
await self.send(self.iopub_socket, "execute_input", content, parent_header=msg["header"])
result = None

code = msg["content"]["code"]
#
Expand Down
6 changes: 4 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ classifier =
Intended Audience :: Developers
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.12
Topic :: Home Automation

[tool:pytest]
Expand All @@ -32,12 +32,14 @@ max-line-length = 109
# E203: Whitespace before ':'
# D202 No blank lines allowed after function docstring
# W504 line break after binary operator
# E231 missing whitespace after ':'
ignore =
E501,
W503,
E203,
D202,
W504
E231

[isort]
# https://github.com/timothycrosley/isort
Expand All @@ -58,7 +60,7 @@ forced_separate = tests
combine_as_imports = true

[mypy]
python_version = 3.9
python_version = 3.12
ignore_errors = true
follow_imports = silent
ignore_missing_imports = true
Expand Down

0 comments on commit f3f0b02

Please sign in to comment.