Skip to content

Commit

Permalink
fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mjurbanski-reef committed Jun 21, 2024
1 parent b63aacc commit 4bf6b72
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/fingerprint/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class UserSession(models.Model):
def __str__(self):
return self.session_key

class Meta:
class Meta: # noqa: D106
constraints = [
models.UniqueConstraint(fields=["session_key", "user"], name="unique_user_session"),
]
Expand Down Expand Up @@ -77,7 +77,7 @@ class AbstractFingerprint(models.Model):
url = models.ForeignKey(Url, on_delete=models.CASCADE, related_name="%(model_name)ss")
created = models.DateTimeField(auto_now_add=True)

class Meta:
class Meta: # noqa: D106
abstract = True
indexes = [
models.Index(fields=["user_session", "-created"]),
Expand Down Expand Up @@ -123,7 +123,7 @@ class BrowserFingerprint(AbstractFingerprint):
def __str__(self) -> str:
return self.visitor_id

class Meta(AbstractFingerprint.Meta):
class Meta(AbstractFingerprint.Meta): # noqa: D106
indexes = [
*AbstractFingerprint.Meta.indexes,
models.Index(fields=["visitor_id", "-created"]),
Expand All @@ -145,7 +145,7 @@ class RequestFingerprint(AbstractFingerprint):
def __str__(self):
return f"{self.ip} {self.user_agent}"

class Meta(AbstractFingerprint.Meta):
class Meta(AbstractFingerprint.Meta): # noqa: D106
indexes = [
*AbstractFingerprint.Meta.indexes,
models.Index(fields=["ip", "-created"]),
Expand All @@ -157,7 +157,7 @@ def get_value_display(self) -> str:


class UserFingerprint(get_user_model()):
"""This is just a proxy model for admin site, since django doesn't allow to register two admins for the same model."""
"""Proxy model for admin site, since django doesn't allow to register two admins for the same model."""

class Meta:
class Meta: # noqa: D106
proxy = True

0 comments on commit 4bf6b72

Please sign in to comment.