Skip to content

Commit

Permalink
Use Python 3.9 for linting
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart committed Nov 13, 2024
1 parent 5a5c105 commit 9b6036c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
with:
python-version: "3.9"
- name: Run Linters
run: |
hatch run typing:test
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ repos:
types_or: [yaml, html, json]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.8.0"
rev: "v1.13.0"
hooks:
- id: mypy
files: jupyter_client
stages: [manual]
args: ["--install-types", "--non-interactive"]
args: ["--install-types", "--non-interactive", "--python-version=3.9"]
additional_dependencies:
["traitlets>=5.13", "ipykernel>=6.26", "jupyter_core>=5.3.2"]

Expand Down
2 changes: 1 addition & 1 deletion jupyter_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ async def _stdin_hook_default(self, msg: t.Dict[str, t.Any]) -> None:
prompt = getpass if content.get("password", False) else input

try:
raw_data = prompt(content["prompt"]) # type:ignore[operator]
raw_data = prompt(content["prompt"])
except EOFError:
# turn EOFError into EOF character
raw_data = "\x04"
Expand Down
2 changes: 2 additions & 0 deletions jupyter_client/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ def launch_kernel(
# If this process in running on pythonw, we know that stdin, stdout, and
# stderr are all invalid.
redirect_out = sys.executable.endswith("pythonw.exe")
_stdout: Any
_stderr: Any
if redirect_out:
blackhole = open(os.devnull, "w") # noqa
_stdout = blackhole if stdout is None else stdout
Expand Down

0 comments on commit 9b6036c

Please sign in to comment.