Skip to content

Commit

Permalink
ci: fix isort
Browse files Browse the repository at this point in the history
  • Loading branch information
danihodovic committed Jun 19, 2024
1 parent 8f7f87d commit eb8346d
Show file tree
Hide file tree
Showing 8 changed files with 304 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ ignore-imports=yes
ignore-signatures=yes

# Minimum lines number of a similarity.
min-similarity-lines=4
min-similarity-lines=50


[SPELLING]
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,10 @@ pytest-django = "4.1.0"
[tool.pytest.ini_options]
addopts = "--ds=tests.settings --reuse-db --pdbcls=pudb.debugger:Debugger"
python_files = "tests.py test_*.py"

[tool.black]
exclude = ".*(venv|virtualenv|.poetry|migrations|node_modules)"

[tool.isort]
skip_glob = "**/migrations/*.py,**/fixtures/*.py"
profile = "black"
1 change: 1 addition & 0 deletions sample_deployment/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ def main():
"""Run administrative tasks."""
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sample_deployment.settings")
try:
# pylint: disable=import-outside-toplevel
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
Expand Down
292 changes: 284 additions & 8 deletions sample_deployment/poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sample_deployment/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ setuptools = "69.5.1"
django-tailwind = {extras = ["reload"], version = "^3.8.0"}
django-extensions = "^3.2.3"
werkzeug = "^3.0.3"
djhtml = "^3.0.6"
pudb = "^2024.1"
ptpython = "^3.0.27"
psycopg2 = "^2.9.9"
whitenoise = "^6.6.0"
djlint = "^1.34.1"


[tool.poetry.group.dev.dependencies]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
{% if code_block %}
<div class="">
<div class="mockup-code">
<pre data-prefix="$" class="text-success"><code>SocialAccount.objects.first().extra_data</code></pre>
<pre data-prefix="$" class="text-success"><code>SocialAccount.objects.first().extra_data</code></pre>
{{ code_block | safe }}
</div>
</div>
{% else %}
You need to <a href="{% url "account_login" %}">
<button class="btn btn-link">
log
in
</button>
</a> to display social account metadata
{% endif %}
<button class="btn btn-link">
log
in
</button>
</a> to display social account metadata
{% endif %}
{% endblock content %}
4 changes: 2 additions & 2 deletions sample_deployment/sample_deployment/example/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class HomePageView(TemplateView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
if self.request.user.is_authenticated:
social_account = SocialAccount.objects.first()
social_account = SocialAccount.objects.first() # pylint: disable=no-member
if social_account:
context["extra_data"] = social_account.extra_data
return context
Expand All @@ -22,7 +22,7 @@ class SocialAccountMetadataView(TemplateView):
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
if self.request.user.is_authenticated:
social_account = SocialAccount.objects.first()
social_account = SocialAccount.objects.first() # pylint: disable=no-member
if social_account:
context["extra_data"] = social_account.extra_data
json_str = json.dumps(social_account.extra_data, indent=2)
Expand Down
2 changes: 1 addition & 1 deletion sample_deployment/sample_deployment/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

from pathlib import Path

import environ
import environ # pylint: disable=import-error

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
Expand Down

0 comments on commit eb8346d

Please sign in to comment.