Skip to content

Commit

Permalink
Merge branch 'main' into reraise-check
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Aug 4, 2022
2 parents df50138 + ba7ac85 commit 653df2e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
6 changes: 1 addition & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,7 @@ repos:
hooks:
- id: flake8
additional_dependencies:
[
"flake8-bugbear==20.1.4",
"flake8-logging-format==0.6.0",
"flake8-implicit-str-concat==0.2.0",
]
["flake8-bugbear==22.6.22", "flake8-implicit-str-concat==0.2.0"]
stages: [manual]

- repo: https://github.com/pre-commit/mirrors-eslint
Expand Down
14 changes: 7 additions & 7 deletions jupyter_server/services/contents/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,13 @@ async def post(self, path=""):
raise web.HTTPError(400, f"Cannot copy file or directory {path!r}")
else:
await self._copy(copy_from, path)

ext = model.get("ext", "")
type = model.get("type", "")
if type not in {None, "", "directory", "file", "notebook"}:
# fall back to file if unknown type
type = "file"
await self._new_untitled(path, type=type, ext=ext)
else:
ext = model.get("ext", "")
type = model.get("type", "")
if type not in {None, "", "directory", "file", "notebook"}:
# fall back to file if unknown type
type = "file"
await self._new_untitled(path, type=type, ext=ext)
else:
await self._new_untitled(path)

Expand Down

0 comments on commit 653df2e

Please sign in to comment.