Skip to content

Commit

Permalink
Merge pull request #2780 from jsoref/spelling
Browse files Browse the repository at this point in the history
Spelling
  • Loading branch information
mouse-reeve authored Apr 7, 2023
2 parents 22dc4cb + a8235fc commit d033848
Show file tree
Hide file tree
Showing 58 changed files with 85 additions and 85 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ USE_HTTPS=true
DOMAIN=your.domain.here
EMAIL=your@email.here

# Instance defualt language (see options at bookwyrm/settings.py "LANGUAGES"
# Instance default language (see options at bookwyrm/settings.py "LANGUAGES"
LANGUAGE_CODE="en-us"
# Used for deciding which editions to prefer
DEFAULT_LANGUAGE="English"
Expand Down
2 changes: 1 addition & 1 deletion bookwyrm/activitystreams.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def populate_streams(self, user):

def _get_audience(self, status): # pylint: disable=no-self-use
"""given a status, what users should see it"""
# direct messages don't appeard in feeds, direct comments/reviews/etc do
# direct messages don't appear in feeds, direct comments/reviews/etc do
if status.privacy == "direct" and status.status_type == "Note":
return []

Expand Down
4 changes: 2 additions & 2 deletions bookwyrm/connectors/abstract_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def get_search_url(self, query):
return f"{self.search_url}{quote_plus(query)}"

def process_search_response(self, query, data, min_confidence):
"""Format the search results based on the formt of the query"""
"""Format the search results based on the format of the query"""
if maybe_isbn(query):
return list(self.parse_isbn_search_data(data))[:10]
return list(self.parse_search_data(data, min_confidence))[:10]
Expand Down Expand Up @@ -321,7 +321,7 @@ def infer_physical_format(format_text):


def unique_physical_format(format_text):
"""only store the format if it isn't diretly in the format mappings"""
"""only store the format if it isn't directly in the format mappings"""
format_text = format_text.lower()
if format_text in format_mappings:
# try a direct match, so saving this would be redundant
Expand Down
2 changes: 1 addition & 1 deletion bookwyrm/connectors/connector_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async def async_connector_search(query, items, min_confidence):


def search(query, min_confidence=0.1, return_first=False):
"""find books based on arbitary keywords"""
"""find books based on arbitrary keywords"""
if not query:
return []
results = []
Expand Down
2 changes: 1 addition & 1 deletion bookwyrm/connectors/inventaire.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def parse_search_data(self, data, min_confidence):
)

def parse_isbn_search_data(self, data):
"""got some daaaata"""
"""got some data"""
results = data.get("entities")
if not results:
return
Expand Down
2 changes: 1 addition & 1 deletion bookwyrm/forms/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# pylint: disable=missing-class-docstring
class ExpiryWidget(widgets.Select):
def value_from_datadict(self, data, files, name):
"""human-readable exiration time buckets"""
"""human-readable expiration time buckets"""
selected_string = super().value_from_datadict(data, files, name)

if selected_string == "day":
Expand Down
4 changes: 2 additions & 2 deletions bookwyrm/lists_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ def get_audience(self, book_list): # pylint: disable=no-self-use
if group:
audience = audience.filter(
Q(id=book_list.user.id) # if the user is the list's owner
| Q(following=book_list.user) # if the user is following the pwmer
| Q(following=book_list.user) # if the user is following the owner
# if a user is in the group
| Q(memberships__group__id=book_list.group.id)
)
else:
audience = audience.filter(
Q(id=book_list.user.id) # if the user is the list's owner
| Q(following=book_list.user) # if the user is following the pwmer
| Q(following=book_list.user) # if the user is following the owner
)
return audience.distinct()

Expand Down
4 changes: 2 additions & 2 deletions bookwyrm/management/commands/deduplicate_book_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ def dedupe_model(model):


class Command(BaseCommand):
"""dedplucate allllll the book data models"""
"""deduplicate allllll the book data models"""

help = "merges duplicate book data"
# pylint: disable=no-self-use,unused-argument
def handle(self, *args, **options):
"""run deudplications"""
"""run deduplications"""
dedupe_model(models.Edition)
dedupe_model(models.Work)
dedupe_model(models.Author)
4 changes: 2 additions & 2 deletions bookwyrm/management/commands/remove_editions.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ def remove_editions():


class Command(BaseCommand):
"""dedplucate allllll the book data models"""
"""deduplicate allllll the book data models"""

help = "merges duplicate book data"
# pylint: disable=no-self-use,unused-argument
def handle(self, *args, **options):
"""run deudplications"""
"""run deduplications"""
remove_editions()
2 changes: 1 addition & 1 deletion bookwyrm/management/commands/revoke_preview_image_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Command(BaseCommand):

# pylint: disable=unused-argument
def handle(self, *args, **options):
"""reveoke nonessential low priority tasks"""
"""revoke nonessential low priority tasks"""
types = [
"bookwyrm.preview_images.generate_edition_preview_image_task",
"bookwyrm.preview_images.generate_user_preview_image_task",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1467,7 +1467,7 @@ class Migration(migrations.Migration):
(
"expiry",
models.DateTimeField(
default=bookwyrm.models.site.get_passowrd_reset_expiry
default=bookwyrm.models.site.get_password_reset_expiry
),
),
(
Expand Down
2 changes: 1 addition & 1 deletion bookwyrm/migrations/0101_auto_20210929_1847.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


def infer_format(app_registry, schema_editor):
"""set the new phsyical format field based on existing format data"""
"""set the new physical format field based on existing format data"""
db_alias = schema_editor.connection.alias

editions = (
Expand Down
2 changes: 1 addition & 1 deletion bookwyrm/migrations/0102_remove_connector_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


def remove_self_connector(app_registry, schema_editor):
"""set the new phsyical format field based on existing format data"""
"""set the new physical format field based on existing format data"""
db_alias = schema_editor.connection.alias
app_registry.get_model("bookwyrm", "Connector").objects.using(db_alias).filter(
connector_file="self_connector"
Expand Down
16 changes: 8 additions & 8 deletions bookwyrm/models/activitypub_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from bookwyrm.models.fields import ImageField, ManyToManyField

logger = logging.getLogger(__name__)
# I tried to separate these classes into mutliple files but I kept getting
# I tried to separate these classes into multiple files but I kept getting
# circular import errors so I gave up. I'm sure it could be done though!

PropertyField = namedtuple("PropertyField", ("set_activity_from_field"))
Expand Down Expand Up @@ -91,7 +91,7 @@ def find_existing_by_remote_id(cls, remote_id):

@classmethod
def find_existing(cls, data):
"""compare data to fields that can be used for deduplation.
"""compare data to fields that can be used for deduplication.
This always includes remote_id, but can also be unique identifiers
like an isbn for an edition"""
filters = []
Expand Down Expand Up @@ -234,8 +234,8 @@ def save(self, *args, created=None, software=None, priority=BROADCAST, **kwargs)
activity = self.to_create_activity(user)
self.broadcast(activity, user, software=software, queue=priority)
except AttributeError:
# janky as heck, this catches the mutliple inheritence chain
# for boosts and ignores this auxilliary broadcast
# janky as heck, this catches the multiple inheritance chain
# for boosts and ignores this auxiliary broadcast
return
return

Expand Down Expand Up @@ -311,7 +311,7 @@ class OrderedCollectionPageMixin(ObjectMixin):

@property
def collection_remote_id(self):
"""this can be overriden if there's a special remote id, ie outbox"""
"""this can be overridden if there's a special remote id, ie outbox"""
return self.remote_id

def to_ordered_collection(
Expand Down Expand Up @@ -339,7 +339,7 @@ def to_ordered_collection(
activity["id"] = remote_id

paginated = Paginator(queryset, PAGE_LENGTH)
# add computed fields specific to orderd collections
# add computed fields specific to ordered collections
activity["totalItems"] = paginated.count
activity["first"] = f"{remote_id}?page=1"
activity["last"] = f"{remote_id}?page={paginated.num_pages}"
Expand Down Expand Up @@ -405,7 +405,7 @@ def save(self, *args, broadcast=True, priority=MEDIUM, **kwargs):
# first off, we want to save normally no matter what
super().save(*args, **kwargs)

# list items can be updateda, normally you would only broadcast on created
# list items can be updated, normally you would only broadcast on created
if not broadcast or not self.user.local:
return

Expand Down Expand Up @@ -565,7 +565,7 @@ async def sign_and_send(
def to_ordered_collection_page(
queryset, remote_id, id_only=False, page=1, pure=False, **kwargs
):
"""serialize and pagiante a queryset"""
"""serialize and paginate a queryset"""
paginated = Paginator(queryset, PAGE_LENGTH)

activity_page = paginated.get_page(page)
Expand Down
2 changes: 1 addition & 1 deletion bookwyrm/models/annual_goal.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AnnualGoal(BookWyrmModel):
)

class Meta:
"""unqiueness constraint"""
"""uniqueness constraint"""

unique_together = ("user", "year")

Expand Down
2 changes: 1 addition & 1 deletion bookwyrm/models/book.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ class Edition(Book):
def get_rank(self):
"""calculate how complete the data is on this edition"""
rank = 0
# big ups for havinga cover
# big ups for having a cover
rank += int(bool(self.cover)) * 3
# is it in the instance's preferred language?
rank += int(bool(DEFAULT_LANGUAGE in self.languages))
Expand Down
8 changes: 4 additions & 4 deletions bookwyrm/models/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ def __init__(
def set_field_from_activity(
self, instance, data, overwrite=True, allow_external_connections=True
):
"""helper function for assinging a value to the field. Returns if changed"""
"""helper function for assigning a value to the field. Returns if changed"""
try:
value = getattr(data, self.get_activitypub_field())
except AttributeError:
# masssively hack-y workaround for boosts
# massively hack-y workaround for boosts
if self.get_activitypub_field() != "attributedTo":
raise
value = getattr(data, "actor")
Expand Down Expand Up @@ -221,7 +221,7 @@ def field_to_activity(self, value):


class PrivacyField(ActivitypubFieldMixin, models.CharField):
"""this maps to two differente activitypub fields"""
"""this maps to two different activitypub fields"""

public = "https://www.w3.org/ns/activitystreams#Public"

Expand Down Expand Up @@ -431,7 +431,7 @@ def __init__(self, *args, alt_field=None, **kwargs):
def set_field_from_activity(
self, instance, data, save=True, overwrite=True, allow_external_connections=True
):
"""helper function for assinging a value to the field"""
"""helper function for assigning a value to the field"""
value = getattr(data, self.get_activitypub_field())
formatted = self.field_from_activity(
value, allow_external_connections=allow_external_connections
Expand Down
2 changes: 1 addition & 1 deletion bookwyrm/models/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Link(ActivitypubMixin, BookWyrmModel):

@property
def name(self):
"""link name via the assocaited domain"""
"""link name via the associated domain"""
return self.domain.name

def save(self, *args, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion bookwyrm/models/notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def notify_user_on_list_item_add(sender, instance, created, *args, **kwargs):
return

list_owner = instance.book_list.user
# create a notification if somoene ELSE added to a local user's list
# create a notification if someone ELSE added to a local user's list
if list_owner.local and list_owner != instance.user:
# keep the related_user singular, group the items
Notification.notify_list_item(list_owner, instance)
Expand Down
2 changes: 1 addition & 1 deletion bookwyrm/models/readthrough.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class ProgressMode(models.TextChoices):
"""types of prgress available"""
"""types of progress available"""

PAGE = "PG", "page"
PERCENT = "PCT", "percent"
Expand Down
2 changes: 1 addition & 1 deletion bookwyrm/models/relationship.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def privacy(self):

@property
def recipients(self):
"""the remote user needs to recieve direct broadcasts"""
"""the remote user needs to receive direct broadcasts"""
return [u for u in [self.user_subject, self.user_object] if not u.local]

def save(self, *args, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion bookwyrm/models/shelf.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def raise_not_deletable(self, viewer):
raise PermissionDenied()

class Meta:
"""user/shelf unqiueness"""
"""user/shelf uniqueness"""

unique_together = ("user", "identifier")

Expand Down
4 changes: 2 additions & 2 deletions bookwyrm/models/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def save(self, *args, **kwargs):
super().save(*args, **kwargs)


def get_passowrd_reset_expiry():
def get_password_reset_expiry():
"""give people a limited time to use the link"""
now = timezone.now()
return now + datetime.timedelta(days=1)
Expand All @@ -219,7 +219,7 @@ class PasswordReset(models.Model):
"""gives someone access to create an account on the instance"""

code = models.CharField(max_length=32, default=new_access_code)
expiry = models.DateTimeField(default=get_passowrd_reset_expiry)
expiry = models.DateTimeField(default=get_password_reset_expiry)
user = models.OneToOneField(User, on_delete=models.CASCADE)

def valid(self):
Expand Down
2 changes: 1 addition & 1 deletion bookwyrm/redis_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def add_object_to_related_stores(self, obj, execute=True):

def remove_object_from_related_stores(self, obj, stores=None):
"""remove an object from all stores"""
# if the stoers are provided, the object can just be an id
# if the stores are provided, the object can just be an id
if stores and isinstance(obj, int):
obj_id = obj
else:
Expand Down
4 changes: 2 additions & 2 deletions bookwyrm/static/css/bookwyrm/components/_book_cover.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* - .book-cover is positioned and sized based on its container.
*
* To have the cover within specific dimensions, specify a width or height for
* standard bulma’s named breapoints:
* standard bulma’s named breakpoints:
*
* `is-(w|h)-(auto|xs|s|m|l|xl|xxl)[-(mobile|tablet|desktop)]`
*
Expand Down Expand Up @@ -43,7 +43,7 @@
max-height: 100%;

/* Useful when stretching under-sized images. */
image-rendering: optimizequality;
image-rendering: optimizeQuality;
image-rendering: smooth;
}

Expand Down
4 changes: 2 additions & 2 deletions bookwyrm/static/js/bookwyrm.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let BookWyrm = new (class {
constructor() {
this.MAX_FILE_SIZE_BYTES = 10 * 1000000;
this.initOnDOMLoaded();
this.initReccuringTasks();
this.initRecurringTasks();
this.initEventListeners();
}

Expand Down Expand Up @@ -77,7 +77,7 @@ let BookWyrm = new (class {
/**
* Execute recurring tasks.
*/
initReccuringTasks() {
initRecurringTasks() {
// Polling
document.querySelectorAll("[data-poll]").forEach((liveArea) => this.polling(liveArea));
}
Expand Down
2 changes: 1 addition & 1 deletion bookwyrm/static/js/forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"use strict";

/**
* Remoev input field
* Remove input field
*
* @param {event} the button click event
*/
Expand Down
2 changes: 1 addition & 1 deletion bookwyrm/templates/preferences/edit_user.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ <h2 class="title is-4">{% trans "Privacy" %}</h2>
</div>
{% url 'user-shelves' request.user.localname as path %}
<p class="notification is-light">
{% blocktrans %}Looking for shelf privacy? You can set a sepearate visibility level for each of your shelves. Go to <a href="{{ path }}">Your Books</a>, pick a shelf from the tab bar, and click "Edit shelf."{% endblocktrans %}
{% blocktrans %}Looking for shelf privacy? You can set a separate visibility level for each of your shelves. Go to <a href="{{ path }}">Your Books</a>, pick a shelf from the tab bar, and click "Edit shelf."{% endblocktrans %}
</p>
</div>
</section>
Expand Down
2 changes: 1 addition & 1 deletion bookwyrm/templates/settings/dashboard/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h3>{% trans "Total users" %}</h3>
<p class="title is-5">{{ users|intcomma }}</p>
</div>
</div>
<div class="column is-3-desktop is-6-mobil is-flexe">
<div class="column is-3-desktop is-6-mobile is-flex">
<div class="notification is-flex-grow-1">
<h3>{% trans "Active this month" %}</h3>
<p class="title is-5">{{ active_users|intcomma }}</p>
Expand Down
Loading

0 comments on commit d033848

Please sign in to comment.