Skip to content

Commit 745f5ba

Browse files
authored
Refresh precommit (#698)
1 parent 49dfe2e commit 745f5ba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+260
-248
lines changed

.github/workflows/downstream.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ name: Test downstream projects
22

33
on:
44
push:
5-
branches: "*"
65
pull_request:
7-
branches: "*"
86

97
jobs:
108
tests:

.github/workflows/integration-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
name: Jupyter Server Integration Tests [Linux]
22
on:
33
push:
4-
branches: "main"
4+
branches: ["main"]
55
pull_request:
6-
branches: "*"
6+
branches: ["*"]
77
jobs:
88
build:
9-
runs-on: ${{ matrix.os }}-latest
9+
runs-on: ${{ matrix.os }}
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
os: [ubuntu]
13+
os: [ubuntu-latest]
1414
python-version: ["3.7", "3.8", "3.9", "3.10", "pypy-3.7"]
1515
steps:
1616
- name: Checkout

.github/workflows/python-linux.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Jupyter Server Tests [Linux]
22
on:
33
push:
4-
branches: "main"
4+
branches: ["main"]
55
pull_request:
6-
branches: "*"
6+
branches: ["*"]
77
jobs:
88
# Run "pre-commit run --all-files"
99
pre-commit:
@@ -30,11 +30,11 @@ jobs:
3030
echo " pre-commit run --all-files"
3131
3232
build:
33-
runs-on: ${{ matrix.os }}-latest
33+
runs-on: ${{ matrix.os }}
3434
strategy:
3535
fail-fast: false
3636
matrix:
37-
os: [ubuntu]
37+
os: [ubuntu-latest]
3838
python-version: ["3.7", "3.8", "3.9", "3.10", "pypy-3.7"]
3939
steps:
4040
- name: Checkout

.github/workflows/python-macos.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
name: Jupyter Server Tests [Mac OS]
22
on:
33
push:
4-
branches: "main"
4+
branches: ["main"]
55
pull_request:
6-
branches: "*"
6+
branches: ["*"]
77
jobs:
88
build:
9-
runs-on: ${{ matrix.os }}-latest
9+
runs-on: ${{ matrix.os }}
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
os: [macos]
13+
os: [macos-latest]
1414
python-version: ["3.7", "3.8", "3.9", "3.10", "pypy-3.7"]
1515
steps:
1616
- name: Checkout

.github/workflows/python-windows.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
name: Jupyter Server Tests [Windows]
22
on:
33
push:
4-
branches: "main"
4+
branches: ["main"]
55
pull_request:
6-
branches: "*"
6+
branches: ["*"]
77
jobs:
88
build:
9-
runs-on: ${{ matrix.os }}-latest
9+
runs-on: ${{ matrix.os }}
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
os: [windows]
13+
os: [windows-latest]
1414
python-version: ["3.7", "3.8", "3.9", "3.10"]
1515
steps:
1616
- name: Checkout

.pre-commit-config.yaml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,49 @@
11
repos:
22
- repo: https://github.com/asottile/reorder_python_imports
3-
rev: v1.9.0
3+
rev: v2.7.1
44
hooks:
55
- id: reorder-python-imports
6+
67
- repo: https://github.com/psf/black
7-
rev: 20.8b1
8+
rev: 22.1.0
89
hooks:
910
- id: black
1011
args: ["--line-length", "100"]
12+
1113
- repo: https://github.com/pre-commit/mirrors-prettier
12-
rev: v2.2.1
14+
rev: v2.5.1
1315
hooks:
1416
- id: prettier
17+
1518
- repo: https://gitlab.com/pycqa/flake8
16-
rev: "3.8.4"
19+
rev: 4.0.1
1720
hooks:
1821
- id: flake8
22+
1923
- repo: https://github.com/pre-commit/pre-commit-hooks
20-
rev: v3.4.0
24+
rev: v4.1.0
2125
hooks:
2226
- id: end-of-file-fixer
2327
- id: check-case-conflict
2428
- id: check-executables-have-shebangs
2529
- id: requirements-txt-fixer
30+
- id: check-added-large-files
31+
- id: check-case-conflict
32+
- id: check-toml
33+
- id: check-yaml
34+
- id: debug-statements
35+
- id: forbid-new-submodules
36+
2637
- repo: https://github.com/pre-commit/mirrors-eslint
27-
rev: v7.32.0
38+
rev: v8.8.0
2839
hooks:
2940
- id: eslint
41+
42+
- repo: https://github.com/sirosen/check-jsonschema
43+
rev: 0.10.2
44+
hooks:
45+
- id: check-jsonschema
46+
name: "Check GitHub Workflows"
47+
files: ^\.github/workflows/
48+
types: [yaml]
49+
args: ["--schemafile", "https://json.schemastore.org/github-workflow"]

examples/simple/simple_ext1/handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def get(self):
4242

4343
class TemplateHandler(BaseTemplateHandler):
4444
def get(self, path):
45-
""" Optionaly, you can print(self.get_template('simple1.html'))"""
45+
"""Optionaly, you can print(self.get_template('simple1.html'))"""
4646
self.write(self.render_template("simple1.html", path=path))
4747

4848

examples/simple/simple_ext1/static/bundle.js

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -57,37 +57,35 @@
5757
/******/
5858
}; // create a fake namespace object // mode & 1: value is a module id, require it // mode & 2: merge all properties of value into the ns // mode & 4: return value when already ns object // mode & 8|1: behave like require
5959
/******/
60-
/******/ /******/ /******/ /******/ /******/ /******/ __webpack_require__.t = function (
61-
value,
62-
mode
63-
) {
64-
/******/ if (mode & 1) value = __webpack_require__(value);
65-
/******/ if (mode & 8) return value;
66-
/******/ if (
67-
mode & 4 &&
68-
typeof value === "object" &&
69-
value &&
70-
value.__esModule
71-
)
72-
return value;
73-
/******/ var ns = Object.create(null);
74-
/******/ __webpack_require__.r(ns);
75-
/******/ Object.defineProperty(ns, "default", {
76-
enumerable: true,
77-
value: value,
78-
});
79-
/******/ if (mode & 2 && typeof value != "string")
80-
for (var key in value)
81-
__webpack_require__.d(
82-
ns,
83-
key,
84-
function (key) {
85-
return value[key];
86-
}.bind(null, key)
87-
);
88-
/******/ return ns;
89-
/******/
90-
}; // getDefaultExport function for compatibility with non-harmony modules
60+
/******/ /******/ /******/ /******/ /******/ /******/ __webpack_require__.t =
61+
function (value, mode) {
62+
/******/ if (mode & 1) value = __webpack_require__(value);
63+
/******/ if (mode & 8) return value;
64+
/******/ if (
65+
mode & 4 &&
66+
typeof value === "object" &&
67+
value &&
68+
value.__esModule
69+
)
70+
return value;
71+
/******/ var ns = Object.create(null);
72+
/******/ __webpack_require__.r(ns);
73+
/******/ Object.defineProperty(ns, "default", {
74+
enumerable: true,
75+
value: value,
76+
});
77+
/******/ if (mode & 2 && typeof value != "string")
78+
for (var key in value)
79+
__webpack_require__.d(
80+
ns,
81+
key,
82+
function (key) {
83+
return value[key];
84+
}.bind(null, key)
85+
);
86+
/******/ return ns;
87+
/******/
88+
}; // getDefaultExport function for compatibility with non-harmony modules
9189
/******/
9290
/******/ /******/ __webpack_require__.n = function (module) {
9391
/******/ var getter =

jupyter_server/_sysinfo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ def pkg_commit_hash(pkg_path):
5656
if repo_commit:
5757
return "repository", repo_commit.strip().decode("ascii")
5858
else:
59-
return u"", u""
59+
return "", ""
6060
par_path = p.dirname(par_path)
6161

62-
return u"", u""
62+
return "", ""
6363

6464

6565
def pkg_info(pkg_path):

jupyter_server/auth/login.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ def passwd_check(self, a, b):
7575
return passwd_check(a, b)
7676

7777
def post(self):
78-
typed_password = self.get_argument("password", default=u"")
79-
new_password = self.get_argument("new_password", default=u"")
78+
typed_password = self.get_argument("password", default="")
79+
new_password = self.get_argument("new_password", default="")
8080

8181
if self.get_login_available(self.settings):
8282
if self.passwd_check(self.hashed_password, typed_password) and not new_password:
@@ -248,7 +248,7 @@ def password_from_settings(cls, settings):
248248
249249
If there is no configured password, an empty string will be returned.
250250
"""
251-
return settings.get("password", u"")
251+
return settings.get("password", "")
252252

253253
@classmethod
254254
def get_login_available(cls, settings):

0 commit comments

Comments
 (0)