mirror of
https://github.com/Crocmagnon/charasheet.git
synced 2024-05-19 09:22:51 +02:00
Compare commits
No commits in common. "0df9713511adf58fc5019a2ea6c2b0609b3127f5" and "9e630b041e17bb2ba4c1576078606831e9335304" have entirely different histories.
0df9713511
...
9e630b041e
|
@ -1,5 +0,0 @@
|
|||
FROM mcr.microsoft.com/devcontainers/python:3.11-bullseye
|
||||
RUN apt-get update && apt-get upgrade -y
|
||||
RUN pip install pip-tools invoke
|
||||
COPY requirements.in requirements.txt requirements-dev.in requirements-dev.txt constraints.txt tasks.py ./
|
||||
RUN invoke sync-dependencies
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile",
|
||||
"context": ".."
|
||||
},
|
||||
"postStartCommand": "inv sync-dependencies && pre-commit install --install-hooks"
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JsonSchemaMappingsProjectConfiguration">
|
||||
<state>
|
||||
<map>
|
||||
<entry key="devcontainer.json">
|
||||
<value>
|
||||
<SchemaInfo>
|
||||
<option name="name" value="devcontainer.json" />
|
||||
<option name="relativePathToSchema" value="https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json" />
|
||||
<option name="applicationDefined" value="true" />
|
||||
<option name="patterns">
|
||||
<list>
|
||||
<Item>
|
||||
<option name="path" value=".devcontainer/devcontainer.json" />
|
||||
</Item>
|
||||
</list>
|
||||
</option>
|
||||
</SchemaInfo>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</state>
|
||||
</component>
|
||||
</project>
|
|
@ -40,7 +40,7 @@ repos:
|
|||
hooks:
|
||||
- id: djhtml
|
||||
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
||||
rev: v0.0.259
|
||||
rev: v0.0.257
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: [--fix]
|
||||
|
|
|
@ -55,7 +55,7 @@ idna==3.4
|
|||
# via
|
||||
# requests
|
||||
# trio
|
||||
markdown==3.4.3
|
||||
markdown==3.4.1
|
||||
# via -r requirements.in
|
||||
outcome==1.2.0
|
||||
# via trio
|
||||
|
@ -67,7 +67,7 @@ requests==2.28.2
|
|||
# via
|
||||
# -r requirements.in
|
||||
# django-anymail
|
||||
selenium==4.8.3
|
||||
selenium==4.8.2
|
||||
# via -r requirements.in
|
||||
sniffio==1.3.0
|
||||
# via trio
|
||||
|
|
|
@ -56,7 +56,6 @@ ignore = [
|
|||
"B011", # Do not call assert False since python -O removes these calls.
|
||||
"ARG001", # Unused function argument (mostly fixtures)
|
||||
"PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable
|
||||
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes.
|
||||
]
|
||||
# File {name} is part of an implicit namespace package. Add an `__init__.py`.
|
||||
"tasks.py" = ["INP001"]
|
||||
|
|
|
@ -66,7 +66,7 @@ exceptiongroup==1.1.1
|
|||
# via
|
||||
# -c constraints.txt
|
||||
# trio-websocket
|
||||
filelock==3.10.4
|
||||
filelock==3.10.0
|
||||
# via virtualenv
|
||||
freezegun==1.2.2
|
||||
# via -r requirements-dev.in
|
||||
|
@ -78,7 +78,7 @@ h11==0.14.0
|
|||
# wsproto
|
||||
hypothesis==6.70.0
|
||||
# via -r requirements-dev.in
|
||||
identify==2.5.22
|
||||
identify==2.5.21
|
||||
# via pre-commit
|
||||
idna==3.4
|
||||
# via
|
||||
|
@ -166,9 +166,9 @@ requests==2.28.2
|
|||
# bpython
|
||||
# pytest-base-url
|
||||
# pytest-selenium
|
||||
ruff==0.0.259
|
||||
ruff==0.0.257
|
||||
# via -r requirements-dev.in
|
||||
selenium==4.8.3
|
||||
selenium==4.8.2
|
||||
# via
|
||||
# -c constraints.txt
|
||||
# pytest-selenium
|
||||
|
|
|
@ -55,7 +55,7 @@ idna==3.4
|
|||
# via
|
||||
# requests
|
||||
# trio
|
||||
markdown==3.4.3
|
||||
markdown==3.4.1
|
||||
# via -r requirements.in
|
||||
outcome==1.2.0
|
||||
# via trio
|
||||
|
@ -67,7 +67,7 @@ requests==2.28.2
|
|||
# via
|
||||
# -r requirements.in
|
||||
# django-anymail
|
||||
selenium==4.8.3
|
||||
selenium==4.8.2
|
||||
# via -r requirements.in
|
||||
sniffio==1.3.0
|
||||
# via trio
|
||||
|
|
|
@ -304,12 +304,12 @@ class Character(models.Model):
|
|||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse("character:view", kwargs={"pk": self.pk})
|
||||
|
||||
def natural_key(self):
|
||||
return (self.name, self.player_id)
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse("character:view", kwargs={"pk": self.pk})
|
||||
|
||||
@property
|
||||
def modifier_strength(self) -> int:
|
||||
return modifier(self.value_strength)
|
||||
|
|
|
@ -123,12 +123,12 @@ class BattleEffect(TimeStampedModel, models.Model):
|
|||
|
||||
objects = BattleEffectManager.from_queryset(BattleEffectQuerySet)()
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
@property
|
||||
def remaining_percent(self) -> float:
|
||||
max_display_percent = 5
|
||||
if self.remaining_rounds >= max_display_percent or self.remaining_rounds < 0:
|
||||
return 100
|
||||
return self.remaining_rounds / max_display_percent * 100
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
|
Loading…
Reference in a new issue