Skip to content

Commit 0111798

Browse files
[pre-commit.ci] pre-commit autoupdate (#1205)Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Steven Silvester <[email protected]>
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/python-jsonschema/check-jsonschema: 0.19.2 → 0.21.0](python-jsonschema/check-jsonschema@0.19.2...0.21.0) - [github.com/psf/black: 22.12.0 → 23.1.0](psf/black@22.12.0...23.1.0) - [github.com/charliermarsh/ruff-pre-commit: v0.0.236 → v0.0.242](astral-sh/ruff-pre-commit@v0.0.236...v0.0.242) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * sync deps * lint * lint * lint * lint --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Steven Silvester <[email protected]>
1 parent e6bff03 commit 0111798

File tree

27 files changed

+35
-42
lines changed

27 files changed

+35
-42
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ repos:
2020
- id: trailing-whitespace
2121

2222
- repo: https://github.com/python-jsonschema/check-jsonschema
23-
rev: 0.19.2
23+
rev: 0.21.0
2424
hooks:
2525
- id: check-github-workflows
2626

@@ -30,12 +30,12 @@ repos:
3030
- id: mdformat
3131

3232
- repo: https://github.com/psf/black
33-
rev: 22.12.0
33+
rev: 23.1.0
3434
hooks:
3535
- id: black
3636

3737
- repo: https://github.com/charliermarsh/ruff-pre-commit
38-
rev: v0.0.236
38+
rev: v0.0.242
3939
hooks:
4040
- id: ruff
4141
args: ["--fix"]

examples/identity/system_password/jupyter_server_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ def process_login_form(self, handler):
2828
return User(username=username, name=user_info.pw_gecos or username)
2929

3030

31-
c = get_config() # type: ignore # noqa
31+
c = get_config() # type: ignore
3232

3333
c.ServerApp.identity_provider_class = SystemPasswordIdentityProvider

jupyter_server/_tz.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def dst(self, d):
2323
return ZERO
2424

2525

26-
UTC = tzUTC()
26+
UTC = tzUTC() # type:ignore
2727

2828

2929
def utc_aware(unaware):

jupyter_server/base/handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ def write_error(self, status_code, **kwargs):
682682
try:
683683
message = exception.log_message % exception.args
684684
except Exception:
685-
pass
685+
pass # noqa
686686

687687
# construct the custom reason, if defined
688688
reason = getattr(exception, "reason", "")

jupyter_server/extension/application.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def _default_serverapp(self):
216216
return ServerApp.instance()
217217
except Exception:
218218
# error retrieving instance, e.g. MultipleInstanceError
219-
pass
219+
pass # noqa
220220

221221
# serverapp accessed before it was defined,
222222
# declare an empty one
@@ -588,7 +588,7 @@ def launch_instance(cls, argv=None, **kwargs):
588588
extension's landing page.
589589
"""
590590
# Handle arguments.
591-
if argv is None:
591+
if argv is None: # noqa
592592
args = sys.argv[1:] # slice out extension config.
593593
else:
594594
args = argv

jupyter_server/extension/handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def static_url(self, path, include_host=None, **kwargs):
115115
if include_host is None:
116116
include_host = getattr(self, "include_host", False)
117117

118-
if include_host:
118+
if include_host: # noqa
119119
base = self.request.protocol + "://" + self.request.host # type:ignore[attr-defined]
120120
else:
121121
base = ""

jupyter_server/gateway/managers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ async def kernel_culled(self, kernel_id: str) -> bool: # typing: ignore
338338
# notification model, this will need to be revisited.
339339
km = self.kernel_manager.get_kernel(kernel_id)
340340
except Exception: # Let exceptions here reflect culled kernel
341-
pass
341+
pass # noqa
342342
return km is None
343343

344344

jupyter_server/nbconvert/handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def get_exporter(format, **kwargs):
6868
"""get an exporter, raising appropriate errors"""
6969
# if this fails, will raise 500
7070
try:
71-
from nbconvert.exporters.base import get_exporter # type:ignore
71+
from nbconvert.exporters.base import get_exporter
7272
except ImportError as e:
7373
raise web.HTTPError(500, "Could not import nbconvert: %s" % e) from e
7474

jupyter_server/prometheus/metrics.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
)
1717

1818
except ImportError:
19-
2019
from prometheus_client import Gauge, Histogram
2120

2221
HTTP_REQUEST_DURATION_SECONDS = Histogram(

jupyter_server/serverapp.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1796,7 +1796,6 @@ def _deprecated_rate_limit_window(self, change):
17961796

17971797
@default("terminals_enabled")
17981798
def _default_terminals_enabled(self):
1799-
18001799
return True
18011800

18021801
authenticate_prometheus = Bool(
@@ -2729,7 +2728,7 @@ def _prepare_browser_open(self):
27292728
if self.identity_provider.token:
27302729
uri = url_concat(uri, {"token": self.identity_provider.token})
27312730

2732-
if self.file_to_run:
2731+
if self.file_to_run: # noqa
27332732
# Create a separate, temporary open-browser-file
27342733
# pointing at a specific file.
27352734
open_file = self.browser_open_file_to_run

0 commit comments

Comments
 (0)