Skip to content

Commit

Permalink
Merge pull request #1547 from deronnax/fix-misspellings
Browse files Browse the repository at this point in the history
fix misspellings
  • Loading branch information
pbiering committed Jul 24, 2024
2 parents 61be51e + 47bc966 commit 1dceaf5
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion radicale/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def exit_signal_handler(signal_number: int,
storage_ = storage.load(configuration)
with storage_.acquire_lock("r"):
if not storage_.verify():
logger.critical("Storage verifcation failed")
logger.critical("Storage verification failed")
sys.exit(1)
except Exception as e:
logger.critical("An exception occurred during storage "
Expand Down
2 changes: 1 addition & 1 deletion radicale/app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def response(status: int, headers: types.WSGIResponseHeaders,
path.rstrip("/").endswith("/.well-known/carddav")):
return response(*httputils.redirect(
base_prefix + "/", client.MOVED_PERMANENTLY))
# Return NOT FOUND for all other paths containing ".well-knwon"
# Return NOT FOUND for all other paths containing ".well-known"
if path.endswith("/.well-known") or "/.well-known/" in path:
return response(*httputils.NOT_FOUND)

Expand Down
6 changes: 3 additions & 3 deletions radicale/app/propfind.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,13 +322,13 @@ def xml_propfind_response(

responses[404 if is404 else 200].append(element)

for status_code, childs in responses.items():
if not childs:
for status_code, children in responses.items():
if not children:
continue
propstat = ET.Element(xmlutils.make_clark("D:propstat"))
response.append(propstat)
prop = ET.Element(xmlutils.make_clark("D:prop"))
prop.extend(childs)
prop.extend(children)
propstat.append(prop)
status = ET.Element(xmlutils.make_clark("D:status"))
status.text = xmlutils.make_response(status_code)
Expand Down
2 changes: 1 addition & 1 deletion radicale/app/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def _make_vobject_expanded_item(
if hasattr(item.vobject_item.vevent, 'rrule'):
rruleset = vevent.getrruleset()

# There is something strage behavour during serialization native datetime, so converting manualy
# There is something strange behaviour during serialization native datetime, so converting manually
vevent.dtstart.value = vevent.dtstart.value.strftime(dt_format)
if dt_end is not None:
vevent.dtend.value = vevent.dtend.value.strftime(dt_format)
Expand Down
2 changes: 1 addition & 1 deletion radicale/auth/htpasswd.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
the password encryption method specified via the ``htpasswd_encryption``
configuration value.
The following htpasswd password encrpytion methods are supported by Radicale
The following htpasswd password encryption methods are supported by Radicale
out-of-the-box:
- plain-text (created by htpasswd -p ...) -- INSECURE
- MD5-APR1 (htpasswd -m ...) -- htpasswd's default method, INSECURE
Expand Down
2 changes: 1 addition & 1 deletion radicale/item/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def find_time_range(vobject_item: vobject.base.Component, tag: str
Returns a tuple (``start``, ``end``) where ``start`` and ``end`` are
POSIX timestamps.
This is intened to be used for matching against simplified prefilters.
This is intended to be used for matching against simplified prefilters.
"""
if not tag:
Expand Down
2 changes: 1 addition & 1 deletion radicale/item/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def visit_time_ranges(vobject_item: vobject.base.Component, child_name: str,
"""

# HACK: According to rfc5545-3.8.4.4 an recurrance that is resheduled
# HACK: According to rfc5545-3.8.4.4 a recurrence that is rescheduled
# with Recurrence ID affects the recurrence itself and all following
# recurrences too. This is not respected and client don't seem to bother
# either.
Expand Down
2 changes: 1 addition & 1 deletion radicale/rights/from_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
The login is matched against the "user" key, and the collection path
is matched against the "collection" key. In the "collection" regex you can use
`{user}` and get groups from the "user" regex with `{0}`, `{1}`, etc.
In consequence of the parameter subsitution you have to write `{{` and `}}`
In consequence of the parameter substitution you have to write `{{` and `}}`
if you want to use regular curly braces in the "user" and "collection" regexes.
For example, for the "user" key, ".+" means "authenticated user" and ".*"
Expand Down
6 changes: 3 additions & 3 deletions radicale/storage/multifilesystem/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def _get(self, href: str, verify_href: bool = True
cache_content = self._load_item_cache(href, cache_hash)
if cache_content is None:
with self._acquire_cache_lock("item"):
# Lock the item cache to prevent multpile processes from
# Lock the item cache to prevent multiple processes from
# generating the same data in parallel.
# This improves the performance for multiple requests.
if self._storage._lock.locked == "r":
Expand Down Expand Up @@ -127,7 +127,7 @@ def _get(self, href: str, verify_href: bool = True

def get_multi(self, hrefs: Iterable[str]
) -> Iterator[Tuple[str, Optional[radicale_item.Item]]]:
# It's faster to check for file name collissions here, because
# It's faster to check for file name collisions here, because
# we only need to call os.listdir once.
files = None
for href in hrefs:
Expand All @@ -146,7 +146,7 @@ def get_multi(self, hrefs: Iterable[str]

def get_all(self) -> Iterator[radicale_item.Item]:
for href in self._list():
# We don't need to check for collissions, because the file names
# We don't need to check for collisions, because the file names
# are from os.listdir.
item = self._get(href, verify_href=False)
if item is not None:
Expand Down
10 changes: 5 additions & 5 deletions radicale/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def parse_responses(text: str) -> RESPONSES:
for response in xml.findall(xmlutils.make_clark("D:response")):
href = response.find(xmlutils.make_clark("D:href"))
assert href.text not in path_responses
prop_respones: Dict[str, Tuple[int, ET.Element]] = {}
prop_responses: Dict[str, Tuple[int, ET.Element]] = {}
for propstat in response.findall(
xmlutils.make_clark("D:propstat")):
status = propstat.find(xmlutils.make_clark("D:status"))
Expand All @@ -121,16 +121,16 @@ def parse_responses(text: str) -> RESPONSES:
for element in propstat.findall(
"./%s/*" % xmlutils.make_clark("D:prop")):
human_tag = xmlutils.make_human_tag(element.tag)
assert human_tag not in prop_respones
prop_respones[human_tag] = (status_code, element)
assert human_tag not in prop_responses
prop_responses[human_tag] = (status_code, element)
status = response.find(xmlutils.make_clark("D:status"))
if status is not None:
assert not prop_respones
assert not prop_responses
assert status.text.startswith("HTTP/1.1 ")
status_code = int(status.text.split(" ")[1])
path_responses[href.text] = status_code
else:
path_responses[href.text] = prop_respones
path_responses[href.text] = prop_responses
return path_responses

def get(self, path: str, check: Optional[int] = 200, **kwargs
Expand Down
10 changes: 5 additions & 5 deletions radicale/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def test_move(self) -> None:
self.get(path1, check=404)
self.get(path2)

def test_move_between_colections(self) -> None:
def test_move_between_collections(self) -> None:
"""Move a item."""
self.mkcalendar("/calendar1.ics/")
self.mkcalendar("/calendar2.ics/")
Expand All @@ -372,7 +372,7 @@ def test_move_between_colections(self) -> None:
self.get(path1, check=404)
self.get(path2)

def test_move_between_colections_duplicate_uid(self) -> None:
def test_move_between_collections_duplicate_uid(self) -> None:
"""Move a item to a collection which already contains the UID."""
self.mkcalendar("/calendar1.ics/")
self.mkcalendar("/calendar2.ics/")
Expand All @@ -388,7 +388,7 @@ def test_move_between_colections_duplicate_uid(self) -> None:
assert xml.tag == xmlutils.make_clark("D:error")
assert xml.find(xmlutils.make_clark("C:no-uid-conflict")) is not None

def test_move_between_colections_overwrite(self) -> None:
def test_move_between_collections_overwrite(self) -> None:
"""Move a item to a collection which already contains the item."""
self.mkcalendar("/calendar1.ics/")
self.mkcalendar("/calendar2.ics/")
Expand All @@ -402,8 +402,8 @@ def test_move_between_colections_overwrite(self) -> None:
self.request("MOVE", path1, check=204, HTTP_OVERWRITE="T",
HTTP_DESTINATION="http://127.0.0.1/"+path2)

def test_move_between_colections_overwrite_uid_conflict(self) -> None:
"""Move a item to a collection which already contains the item with
def test_move_between_collections_overwrite_uid_conflict(self) -> None:
"""Move an item to a collection which already contains the item with
a different UID."""
self.mkcalendar("/calendar1.ics/")
self.mkcalendar("/calendar2.ics/")
Expand Down

0 comments on commit 1dceaf5

Please sign in to comment.