Fix typos and grammar issues

This commit is contained in:
rubenwardy
2023-06-18 22:07:46 +01:00
parent e8b14709e6
commit f2cfb6c17d
19 changed files with 29 additions and 29 deletions

View File

@@ -46,7 +46,7 @@ def checkForumAccount(forums_username):
user.forums_username = forums_username
db.session.add(user)
# Get github username
# Get GitHub username
github_username = profile.get("github")
if github_username is not None and github_username.strip() != "":
print("Updated GitHub username for " + user.display_name + " to " + github_username)

View File

@@ -18,7 +18,7 @@ class ContentType(Enum):
def validate_same(self, other):
"""
Whether or not `other` is an acceptable type for this
Whether `other` is an acceptable type for this
"""
assert other

View File

@@ -203,22 +203,22 @@ class PackageTreeNode:
self.children.append(child)
def getModNames(self):
return self.fold("name", type=ContentType.MOD)
return self.fold("name", type_=ContentType.MOD)
# attr: Attribute name
# key: Key in attribute
# retval: Accumulator
# type: Filter to type
def fold(self, attr, key=None, retval=None, type=None):
# type_: Filter to type
def fold(self, attr, key=None, retval=None, type_=None):
if retval is None:
retval = set()
# Iterate through children
for child in self.children:
child.fold(attr, key, retval, type)
child.fold(attr, key, retval, type_)
# Filter on type
if type and type != self.type:
if type_ and type_ != self.type:
return retval
# Get attribute