Skip to content

Commit

Permalink
fix: typos and add codespell GitHub action (#1251)
Browse files Browse the repository at this point in the history
  • Loading branch information
kianmeng authored Dec 4, 2022
1 parent 232bed0 commit b798dc9
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 22 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pythonpackage-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: codespell-project/actions-codespell@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -1487,7 +1487,7 @@ errors = client.remove_objects(
],
)
for error in errors:
print("error occured when deleting object", error)
print("error occurred when deleting object", error)

# Remove a prefix recursively.
delete_object_list = map(
Expand All @@ -1496,7 +1496,7 @@ delete_object_list = map(
)
errors = client.remove_objects("my-bucket", delete_object_list)
for error in errors:
print("error occured when deleting object", error)
print("error occurred when deleting object", error)
```

<a name="delete_object_tags"></a>
Expand Down
4 changes: 2 additions & 2 deletions examples/remove_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
],
)
for error in errors:
print("error occured when deleting object", error)
print("error occurred when deleting object", error)

# Remove a prefix recursively.
delete_object_list = map(
Expand All @@ -42,4 +42,4 @@
)
errors = client.remove_objects("my-bucket", delete_object_list)
for error in errors:
print("error occured when deleting object", error)
print("error occurred when deleting object", error)
6 changes: 3 additions & 3 deletions minio/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1970,7 +1970,7 @@ def remove_objects(self, bucket_name, delete_object_list,
],
)
for error in errors:
print("error occured when deleting object", error)
print("error occurred when deleting object", error)
# Remove a prefix recursively.
delete_object_list = map(
Expand All @@ -1979,7 +1979,7 @@ def remove_objects(self, bucket_name, delete_object_list,
)
errors = client.remove_objects("my-bucket", delete_object_list)
for error in errors:
print("error occured when deleting object", error)
print("error occurred when deleting object", error)
"""
check_bucket_name(bucket_name)

Expand Down Expand Up @@ -2597,7 +2597,7 @@ def set_object_lock_config(self, bucket_name, config):
Example::
config = ObjectLockConfig(GOVERNANCE, 15, DAYS)
client.set_object_lock_condig("my-bucket", config)
client.set_object_lock_config("my-bucket", config)
"""
check_bucket_name(bucket_name)
if not isinstance(config, ObjectLockConfig):
Expand Down
4 changes: 2 additions & 2 deletions minio/commonconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def gen_copy_headers(self):


class CopySource(ObjectConditionalReadArgs):
"""A source object defintion for copy_object method."""
"""A source object definition for copy_object method."""
@classmethod
def of(cls, src):
"""Create CopySource from another source."""
Expand All @@ -399,7 +399,7 @@ def of(cls, src):


class ComposeSource(ObjectConditionalReadArgs):
"""A source object defintion for compose_object method."""
"""A source object definition for compose_object method."""

def __init__(self, bucket_name, object_name, region=None, version_id=None,
ssec=None, offset=None, length=None, match_etag=None,
Expand Down
2 changes: 1 addition & 1 deletion minio/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ def __init__(self, tasks_queue, results_queue, exceptions_queue):
self.start()

def run(self):
""" Continously receive tasks and execute them """
""" Continuously receive tasks and execute them """
while True:
task = self._tasks_queue.get()
if not task:
Expand Down
4 changes: 2 additions & 2 deletions minio/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class SelectRequest:
def __init__(self, expression, input_serialization, output_serialization,
request_progress=False, scan_start_range=None,
scan_end_range=None):
self._expession = expression
self._expression = expression
if not isinstance(
input_serialization,
(
Expand Down Expand Up @@ -249,7 +249,7 @@ def __init__(self, expression, input_serialization, output_serialization,
def toxml(self, element):
"""Convert to XML."""
element = Element("SelectObjectContentRequest")
SubElement(element, "Expression", self._expession)
SubElement(element, "Expression", self._expression)
SubElement(element, "ExpressionType", "SQL")
self._input_serialization.toxml(
SubElement(element, "InputSerialization"),
Expand Down
2 changes: 1 addition & 1 deletion minio/sseconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def toxml(self, element):


class SSEConfig:
"""server-side encyption configuration."""
"""server-side encryption configuration."""

def __init__(self, rule):
if not rule:
Expand Down
16 changes: 8 additions & 8 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ output-format=colorized
# written in a file name "pylint_global.[txt|html]".
#files-output=no

# Tells wether to display a full report or only the messages
# Tells whether to display a full report or only the messages
reports=yes

# Python expression which should return a note less than 10 (10 is the highest
# note).You have access to the variables errors warning, statement which
# respectivly contain the number of errors / warnings messages and the total
# respectively contain the number of errors / warnings messages and the total
# number of statements analyzed. This is used by the global evaluation report
# (R0004).
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
Expand All @@ -88,11 +88,11 @@ evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / stateme
# * unused variables / imports
# * undefined variables
# * redefinition of variable from builtins or from an outer scope
# * use of variable before assigment
# * use of variable before assignment
#
[VARIABLES]

# Tells wether we should check for unused import in __init__ files.
# Tells whether we should check for unused import in __init__ files.
init-import=yes

# A regular expression matching names used for dummy variables (i.e. not used).
Expand All @@ -107,15 +107,15 @@ additional-builtins=
#
[TYPECHECK]

# Tells wether missing members accessed in mixin class should be ignored. A
# Tells whether missing members accessed in mixin class should be ignored. A
# mixin class is detected if its name ends with "mixin" (case insensitive).
ignore-mixin-members=yes

# When zope mode is activated, consider the acquired-members option to ignore
# access to some undefined attributes.
#zope=no

# List of members which are usually get through zope's acquisition mecanism and
# List of members which are usually get through zope's acquisition mechanism and
# so shouldn't trigger E0201 when accessed (need zope=yes to be considered).
#acquired-members=REQUEST,acl_users,aq_parent

Expand Down Expand Up @@ -193,7 +193,7 @@ max-locals=30
max-returns=12

# Maximum number of branch for function / method body
#max-branchs=30
#max-branches=30

# Maximum number of statements in function / method body
max-statements=60
Expand Down Expand Up @@ -238,7 +238,7 @@ int-import-graph=
# checks for :
# * methods without self as first argument
# * overridden methods signature
# * access only to existant members via self
# * access only to existent members via self
# * attributes not defined in the __init__ method
# * supported interfaces implementation
# * unreachable code
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,7 @@ def _test_list_objects(log_entry, use_api_v1=False, version_check=False):
raise ValueError(
f"version ID mismatch. "
f"expected=any{[version_id1, version_id2]}, "
f"got:{obj.verion_id}"
f"got:{obj.version_id}"
)
finally:
_CLIENT.remove_object(
Expand Down

0 comments on commit b798dc9

Please sign in to comment.