Skip to content

Commit

Permalink
update project settings
Browse files Browse the repository at this point in the history
  • Loading branch information
falkoschindler committed Aug 7, 2024
1 parent 3f63432 commit 6f3815b
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 30 deletions.
9 changes: 0 additions & 9 deletions .components.yaml

This file was deleted.

19 changes: 19 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
default_language_version:
python: python3.8
default_install_hook_types: [pre-commit, pre-push]
default_stages: [commit]

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.5
hooks:
- id: ruff
args: [--fix]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
exclude: ^nicegui_highcharts/lib/
- id: end-of-file-fixer
exclude: ^nicegui_highcharts/lib/
- id: double-quote-string-fixer
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"autopep8.args": ["--max-line-length=120"],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"isort.args": ["--line-length", "120"],
"prettier.printWidth": 120,
"pylint.args": [
"--disable=C0103", // Invalid name (e.g., variable/function/class naming conventions)
Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
],
}, extras=['solid-gauge'])

ui.run()
ui.run(port=7777)
17 changes: 16 additions & 1 deletion nicegui-highcharts.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,20 @@
"path": "."
}
],
"settings": {}
"settings": {
"ruff.enable": true
},
"extensions": {
"recommendations": [
"charliermarsh.ruff",
"cschleiden.vscode-github-actions",
"esbenp.prettier-vscode",
"ms-python.autopep8",
"ms-python.mypy-type-checker",
"ms-python.pylint",
"ms-python.python",
"ms-python.vscode-pylance",
"Vue.volar"
]
}
}
12 changes: 8 additions & 4 deletions nicegui_highcharts/highchart.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@

from nicegui import events, ui

from .events import (ChartPointClickEventArguments, ChartPointDragEventArguments, ChartPointDragStartEventArguments,
ChartPointDropEventArguments)
from .events import (
ChartPointClickEventArguments,
ChartPointDragEventArguments,
ChartPointDragStartEventArguments,
ChartPointDropEventArguments,
)


class Highchart(ui.element,
component='highchart.js',
exposed_libraries=[
dependencies=[
'lib/highcharts/*.js',
'lib/highcharts/modules/*.js',
]):

def __init__(self, options: Dict, *,
type: str = 'chart', extras: List[str] = [], # pylint: disable=redefined-builtin
type: str = 'chart', extras: List[str] = [], # noqa: B006 # pylint: disable=redefined-builtin
on_point_click: Optional[Callable] = None,
on_point_drag_start: Optional[Callable] = None,
on_point_drag: Optional[Callable] = None,
Expand Down
26 changes: 24 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ keywords = ["charts", "highcharts", "gui", "ui", "web"]

[tool.poetry.dependencies]
python = "^3.8"
nicegui = "^1.4.0"
nicegui = "^2.0.0"

[build-system]
requires = [
Expand All @@ -20,4 +20,26 @@ requires = [
build-backend = "poetry.core.masonry.api"

[tool.mypy]
ignore_missing_imports = true
python_version = "3.8"

[tool.ruff]
indent-width = 4
line-length = 120

[tool.ruff.lint]
select = [
"I", # isort
"E", # pycodestyle
"W", # pycodestyle
"B", # bugbear
"F", # pyflakes
"UP", # pyupgrade
"RUF", # ruff
"PL", # pylint
]
fixable = [
"I", # isort
]
ignore = [
"PLR0913", # too-many-arguments
]
1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

11 changes: 0 additions & 11 deletions setup.py

This file was deleted.

0 comments on commit 6f3815b

Please sign in to comment.