Skip to content

Commit

Permalink
Update black isort and vscode settings
Browse files Browse the repository at this point in the history
  • Loading branch information
monim67 committed Feb 9, 2024
1 parent de84ab3 commit b04d82f
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 71 deletions.
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"ms-python.python",
"ms-python.black-formatter",
"ms-python.isort"
]
}
5 changes: 1 addition & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{
"python.formatting.provider": "black",
"python.linting.mypyEnabled": true,
"python.linting.pydocstyleEnabled": true,
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": false,
"[python]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
"source.organizeImports": "explicit"
}
},
"[javascript]": {
Expand Down
102 changes: 50 additions & 52 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ django-bootstrap5 = "^22.1"
django-bootstrap-modal-forms = "^2.2.1"
pytest-django = "^4.5.2"
pytest-dotenv = "^0.5.2"
black = "^22.6.0"
isort = "^5.10.1"
black = "^24.1.1"
isort = "^5.13.2"
pyright = "^1.1.350"
pydocstyle = { extras = ["toml"], version = "^6.1.1" }
django-stubs = "^1.12.0"
Expand Down
1 change: 1 addition & 0 deletions src/bootstrap_datepicker_plus/_base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains Base Date-Picker input class for widgets of this package."""

import warnings
from typing import Any, Dict, Optional, Tuple

Expand Down
30 changes: 17 additions & 13 deletions src/bootstrap_datepicker_plus/settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Package settings."""

import functools
from typing import Any, Dict, Optional, Tuple

Expand All @@ -8,8 +9,11 @@
from pydantic import Field, validator
from pydantic.env_settings import BaseSettings, SettingsSourceCallable
except: # pragma: no cover
from pydantic.v1.env_settings import BaseSettings, SettingsSourceCallable # type: ignore
from pydantic.v1 import Field, validator # type: ignore
from pydantic.v1.env_settings import ( # type: ignore
BaseSettings,
SettingsSourceCallable,
)

from .schemas import WidgetOptions, WidgetVariant

Expand All @@ -32,18 +36,18 @@ class WidgetSettings(BaseSettings): # pyright: ignore
WidgetVariant.month: "bi-calendar",
WidgetVariant.year: "bi-calendar",
}
momentjs_url: Optional[
str
] = "https://cdn.jsdelivr.net/npm/[email protected]/min/moment-with-locales.min.js"
datetimepicker_js_url: Optional[
str
] = "https://cdn.jsdelivr.net/npm/[email protected]/build/js/bootstrap-datetimepicker.min.js"
datetimepicker_css_url: Optional[
str
] = "https://cdn.jsdelivr.net/npm/[email protected]/build/css/bootstrap-datetimepicker.min.css"
bootstrap_icon_css_url: Optional[
str
] = "https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"
momentjs_url: Optional[str] = (
"https://cdn.jsdelivr.net/npm/[email protected]/min/moment-with-locales.min.js"
)
datetimepicker_js_url: Optional[str] = (
"https://cdn.jsdelivr.net/npm/[email protected]/build/js/bootstrap-datetimepicker.min.js"
)
datetimepicker_css_url: Optional[str] = (
"https://cdn.jsdelivr.net/npm/[email protected]/build/css/bootstrap-datetimepicker.min.css"
)
bootstrap_icon_css_url: Optional[str] = (
"https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"
)
app_static_url = "https://cdn.jsdelivr.net/gh/monim67/[email protected]/src/bootstrap_datepicker_plus/static/bootstrap_datepicker_plus/"
debug: bool = Field(default_factory=lambda: getattr(django_settings, "DEBUG", True))

Expand Down

0 comments on commit b04d82f

Please sign in to comment.