-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #390 from consideRatio/pr/pre-commit
pre-commit: add config and small fixes
- Loading branch information
Showing
33 changed files
with
888 additions
and
625 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# flake8 is used for linting Python code setup to automatically run with | ||
# pre-commit. | ||
# | ||
# ref: https://flake8.pycqa.org/en/latest/user/configuration.html | ||
# | ||
|
||
[flake8] | ||
# E: style errors | ||
# W: style warnings | ||
# C: complexity | ||
# D: docstring warnings (unused pydocstyle extension) | ||
ignore = E, C, W, D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# pre-commit is a tool to perform a predefined set of tasks manually and/or | ||
# automatically before git commits are made. | ||
# | ||
# Config reference: https://pre-commit.com/#pre-commit-configyaml---top-level | ||
# | ||
# Common tasks | ||
# | ||
# - Run on all files: pre-commit run --all-files | ||
# - Register git hooks: pre-commit install --install-hooks | ||
# | ||
repos: | ||
# Autoformat: Python code, syntax patterns are modernized | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.3.1 | ||
hooks: | ||
- id: pyupgrade | ||
args: | ||
- --py38-plus | ||
|
||
# Autoformat: Python code | ||
- repo: https://github.com/PyCQA/autoflake | ||
rev: v2.0.2 | ||
hooks: | ||
- id: autoflake | ||
# args ref: https://github.com/PyCQA/autoflake#advanced-usage | ||
args: | ||
- --in-place | ||
|
||
# Autoformat: Python code | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
|
||
# Autoformat: Python code | ||
- repo: https://github.com/psf/black | ||
rev: 23.3.0 | ||
hooks: | ||
- id: black | ||
exclude: "contrib\/template\/.*" | ||
|
||
# Autoformat: markdown, yaml | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v3.0.0-alpha.6 | ||
hooks: | ||
- id: prettier | ||
|
||
# Misc... | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
# ref: https://github.com/pre-commit/pre-commit-hooks#hooks-available | ||
hooks: | ||
# Autoformat: Makes sure files end in a newline and only a newline. | ||
- id: end-of-file-fixer | ||
|
||
# Autoformat: Sorts entries in requirements.txt. | ||
- id: requirements-txt-fixer | ||
|
||
# Lint: Check for files with names that would conflict on a | ||
# case-insensitive filesystem like MacOS HFS+ or Windows FAT. | ||
- id: check-case-conflict | ||
|
||
# Lint: Checks that non-binary executables have a proper shebang. | ||
- id: check-executables-have-shebangs | ||
|
||
# Lint: Python code | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: "6.0.0" | ||
hooks: | ||
- id: flake8 | ||
|
||
# pre-commit.ci config reference: https://pre-commit.ci/#configuration | ||
ci: | ||
autoupdate_schedule: monthly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
# load the config object for traitlets based configuration | ||
c = get_config() # noqa | ||
|
||
|
||
c.ServerProxy.servers = { | ||
'code-server': { | ||
'command': [ | ||
'code-server', | ||
'--auth=none', | ||
'--disable-telemetry', | ||
'--bind-addr=localhost:{port}' | ||
], | ||
'timeout': 20, | ||
'launcher_entry': { | ||
'title': 'VS Code' | ||
"code-server": { | ||
"command": [ | ||
"code-server", | ||
"--auth=none", | ||
"--disable-telemetry", | ||
"--bind-addr=localhost:{port}", | ||
], | ||
"timeout": 20, | ||
"launcher_entry": {"title": "VS Code"}, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"project_name": "", | ||
"author_name": "Project Jupyter Contributors", | ||
"author_email": "[email protected]" | ||
"project_name": "", | ||
"author_name": "Project Jupyter Contributors", | ||
"author_email": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
""" | ||
import os | ||
|
||
|
||
def setup_{{cookiecutter.project_name}}(): | ||
return { | ||
'command': [], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,22 +2,20 @@ | |
|
||
setuptools.setup( | ||
name="jupyter-theia-proxy", | ||
version='1.0dev', | ||
version="1.0dev", | ||
url="https://github.com/jupyterhub/jupyter-server-proxy/tree/HEAD/contrib/theia", | ||
author="Project Jupyter Contributors", | ||
description="[email protected]", | ||
packages=setuptools.find_packages(), | ||
keywords=['Jupyter'], | ||
classifiers=['Framework :: Jupyter'], | ||
install_requires=[ | ||
'jupyter-server-proxy' | ||
], | ||
keywords=["Jupyter"], | ||
classifiers=["Framework :: Jupyter"], | ||
install_requires=["jupyter-server-proxy"], | ||
entry_points={ | ||
'jupyter_serverproxy_servers': [ | ||
'theia = jupyter_theia_proxy:setup_theia', | ||
"jupyter_serverproxy_servers": [ | ||
"theia = jupyter_theia_proxy:setup_theia", | ||
] | ||
}, | ||
package_data={ | ||
'jupyter_theia_proxy': ['icons/*'], | ||
"jupyter_theia_proxy": ["icons/*"], | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.