Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#341)Co-authored-by: pre-commi…
Browse files Browse the repository at this point in the history
…t-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.237 → v0.0.243](astral-sh/ruff-pre-commit@v0.0.237...v0.0.243)

* sync deps and 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]>
  • Loading branch information
pre-commit-ci[bot] and blink1073 authored Feb 7, 2023
1 parent 98ab1ef commit 484d412
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.19.2
rev: 0.21.0
hooks:
- id: check-github-workflows

Expand All @@ -30,12 +30,12 @@ repos:
- id: mdformat

- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.1.0
hooks:
- id: black

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.237
rev: v0.0.243
hooks:
- id: ruff
args: ["--fix"]
Expand Down
8 changes: 4 additions & 4 deletions jupyter_core/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def jupyter_path(*subdirs: str) -> List[str]:
else:
if os.name == "nt":
programdata = os.environ.get("PROGRAMDATA", None)
if programdata:
if programdata: # noqa
SYSTEM_CONFIG_PATH = [os.path.join(programdata, "jupyter")]
else: # PROGRAMDATA is not defined by default on XP.
SYSTEM_CONFIG_PATH = []
Expand Down Expand Up @@ -520,12 +520,12 @@ def win32_restrict_file_to_user(fname: str) -> None:
The path to the file to secure
"""
try:
import win32api # type:ignore[import]
import win32api
except ImportError:
return _win32_restrict_file_to_user_ctypes(fname)

import ntsecuritycon as con # type:ignore[import]
import win32security # type:ignore[import]
import ntsecuritycon as con
import win32security

# everyone, _domain, _type = win32security.LookupAccountName("", "Everyone")
admins = win32security.CreateWellKnownSid(win32security.WinBuiltinAdministratorsSid)
Expand Down
2 changes: 1 addition & 1 deletion jupyter_core/tests/test_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ def check_user_only_permissions(fname):
assert "administrators" in permissions
assert permissions["administrators"] == {"f"}
assert "everyone" not in permissions
assert len(permissions) == 2 # noqa
assert len(permissions) == 2

directory = tempfile.mkdtemp()
fname = os.path.join(directory, "check_perms")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ dependencies = ["mypy>=0.990"]
test = "mypy --install-types --non-interactive {args:.}"

[tool.hatch.envs.lint]
dependencies = ["black==22.12.0", "mdformat>0.7", "ruff==0.0.237"]
dependencies = ["black==23.1.0", "mdformat>0.7", "ruff==0.0.243"]
detached = true
[tool.hatch.envs.lint.scripts]
style = [
Expand Down

0 comments on commit 484d412

Please sign in to comment.