Skip to content

Commit 79f541b

Browse files
authored
All: Fixes typos (#673)
* All: Fixes typos Scanned over whole repository and fixes some typos. * All: Correction of typos in methods Renaming methods can be dangerous for software that is already running with older versions of the library. Therefore the renaming should be done softly. Old methods are marked as deprecated and a fixed method is created. In the confluence script there was already a refactored function. So this typo change was reverted. In the bitbucket script a new function with correct method name is introduced. The typo method was set to deprecated.
1 parent a1e4a53 commit 79f541b

File tree

15 files changed

+43
-41
lines changed

15 files changed

+43
-41
lines changed

atlassian/bitbucket/__init__.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,17 +1426,19 @@ def update_pull_request_comment(
14261426
data = {"version": comment_version, "text": comment}
14271427
return self.put(url, data=data)
14281428

1429-
def delete_pull_reques_comment(
1430-
self,
1431-
project_key,
1432-
repository_slug,
1433-
pull_request_id,
1434-
comment_id,
1435-
comment_version,
1436-
):
1429+
@deprecated
1430+
def delete_pull_reques_comment(self, project_key, repository_slug, pull_request_id, comment_id, comment_version):
1431+
"""
1432+
Typo will be removed
1433+
"""
1434+
return self.delete_pull_request_comment(
1435+
project_key, repository_slug, pull_request_id, comment_id, comment_version
1436+
)
1437+
1438+
def delete_pull_request_comment(self, project_key, repository_slug, pull_request_id, comment_id, comment_version):
14371439
"""
14381440
Delete a comment.
1439-
Only the repository admin or eser who created a comment may update it.
1441+
Only the repository admin or user who created a comment may update it.
14401442
14411443
Note: the supplied supplied JSON object must contain a version
14421444
that must match the server's version of the comment

atlassian/bitbucket/cloud/repositories/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def each(self, after=None, role=None, q=None, sort=None):
4343
:param sort: string: Name of a response property to sort results.
4444
See https://developer.atlassian.com/bitbucket/api/2/reference/meta/filtering for details.
4545
46-
:return: A generator for the Rorkspace objects
46+
:return: A generator for the repository objects
4747
"""
4848
if q is not None and role is None:
4949
raise ValueError("Argument [q] requires argument [role].")
@@ -80,7 +80,7 @@ def each(self, role=None, q=None, sort=None):
8080
:param sort: string: Name of a response property to sort results.
8181
See https://developer.atlassian.com/bitbucket/api/2/reference/meta/filtering for details.
8282
83-
:return: A generator for the Rorkspace objects
83+
:return: A generator for the workspace objects
8484
"""
8585
params = {}
8686
if role is not None:
@@ -124,7 +124,7 @@ def each(self, sort=None):
124124
:param sort: string: Name of a response property to sort results.
125125
See https://developer.atlassian.com/bitbucket/api/2/reference/meta/filtering for details.
126126
127-
:return: A generator for the Rorkspace objects
127+
:return: A generator for the repository objects
128128
"""
129129
params = {}
130130
if sort is not None:

atlassian/bitbucket/cloud/repositories/pipelines.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def log(self, start=None, end=None):
182182
"""
183183
Returns the log content in the given range.
184184
185-
:param start: int: The start of the range. First elment is 0.
185+
:param start: int: The start of the range. First element is 0.
186186
:param end: int: The end of the range, must be greater than start.
187187
188188
:return: The byte representation of the log or if range is given a tuple with

atlassian/bitbucket/cloud/repositories/pullRequests.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def create(
6161
):
6262
"""
6363
Creates a new pull requests for a given source branch
64-
Be careful, adding this mulitple times for the same source branch updates the pull request!
64+
Be careful, adding this multiple times for the same source branch updates the pull request!
6565
6666
:param title: string: pull request title
6767
:param source_branch: string: name of the source branch
@@ -259,7 +259,7 @@ def request_changes(self):
259259

260260
def unrequest_changes(self):
261261
"""
262-
Request changes for the pull request if open
262+
Unrequest changes for the pull request if open
263263
264264
API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pullrequests/%7Bpull_request_id%7D/request-changes#delete
265265
"""
@@ -288,7 +288,7 @@ def merge(self, merge_strategy=None, close_source_branch=None):
288288
self._check_if_open()
289289

290290
if merge_strategy is not None and merge_strategy not in self.MERGE_STRATEGIES:
291-
raise ValueError("merge_stragegy must be {}".format(self.MERGE_STRATEGIES))
291+
raise ValueError("merge_strategy must be {}".format(self.MERGE_STRATEGIES))
292292

293293
data = {
294294
"close_source_branch": close_source_branch or self.close_source_branch,

atlassian/bitbucket/server/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
class Server(BitbucketServerBase):
99
"""
10-
Class implementing parts of the REST API descrribed in
10+
Class implementing parts of the REST API described in
1111
https://docs.atlassian.com/bitbucket-server/rest/7.8.0/bitbucket-rest.html
1212
"""
1313

atlassian/bitbucket/server/common/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def each(self, filter=None):
5858
5959
For project groups see https://docs.atlassian.com/bitbucket-server/rest/7.8.0/bitbucket-rest.html#idp159
6060
For project users see https://docs.atlassian.com/bitbucket-server/rest/7.8.0/bitbucket-rest.html#idp165
61-
For repository groupss see https://docs.atlassian.com/bitbucket-server/rest/7.8.0/bitbucket-rest.html#idp280
61+
For repository groups see https://docs.atlassian.com/bitbucket-server/rest/7.8.0/bitbucket-rest.html#idp280
6262
For repository users see https://docs.atlassian.com/bitbucket-server/rest/7.8.0/bitbucket-rest.html#idp286
6363
6464
:params filter: string: If specified only group/user names containing the supplied string will be returned
@@ -131,7 +131,7 @@ class PermissionBase(BitbucketServerBase):
131131
@property
132132
def permission(self):
133133
if self.url is None:
134-
raise NotImplementedError("Pemission not implemented for this object type.")
134+
raise NotImplementedError("Permission not implemented for this object type.")
135135
return self.get_data("permission")
136136

137137
@property

atlassian/bitbucket/server/globalPermissions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class PermissionBase(BitbucketServerBase):
128128
@property
129129
def permission(self):
130130
if self.url is None:
131-
raise NotImplementedError("Pemission not implemented for this object type.")
131+
raise NotImplementedError("Permission not implemented for this object type.")
132132
return self.get_data("permission")
133133

134134
@property

atlassian/bitbucket/server/projects/repos/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def __get_object(self, data):
1515

1616
def create(self, name):
1717
"""
18-
Creates a new repostiory with the given name.
18+
Creates a new repository with the given name.
1919
2020
See https://docs.atlassian.com/bitbucket-server/rest/7.8.0/bitbucket-rest.html#idp174
2121
@@ -116,9 +116,9 @@ def contributing(self, at=None, markup=None):
116116
https://docs.atlassian.com/bitbucket-server/rest/7.8.0/bitbucket-rest.html#idp183
117117
118118
:param at: string: Optional, the commit to get the contributing guideline from.
119-
:param markup: boolean: Optional, If set to true, the rendered content is returnded as HTML.
119+
:param markup: boolean: Optional, If set to true, the rendered content is returned as HTML.
120120
121-
:return: The text content of the contributing guidlines.
121+
:return: The text content of the contributing guidelines.
122122
"""
123123
params = {}
124124
if at is not None:
@@ -135,7 +135,7 @@ def license(self, at=None, markup=None):
135135
https://docs.atlassian.com/bitbucket-server/rest/7.8.0/bitbucket-rest.html#idp191
136136
137137
:param at: string: Optional, the commit to get the license file from.
138-
:param markup: boolean: Optional, If set to true, the rendered content is returnded as HTML.
138+
:param markup: boolean: Optional, If set to true, the rendered content is returned as HTML.
139139
140140
:return: The text content of the license file.
141141
"""
@@ -154,7 +154,7 @@ def readme(self, at=None, markup=None):
154154
https://docs.atlassian.com/bitbucket-server/rest/7.8.0/bitbucket-rest.html#idp194
155155
156156
:param at: string: Optional, the commit to get the readme file from.
157-
:param markup: boolean: Optional, If set to true, the rendered content is returnded as HTML.
157+
:param markup: boolean: Optional, If set to true, the rendered content is returned as HTML.
158158
159159
:return: The text content of the readme file.
160160
"""

atlassian/confluence.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ def attach_content(
821821
:type page_id: ``str``
822822
:param name: The name of the attachment
823823
:type name: ``str``
824-
:param content: Contains the content which should be uplaoded
824+
:param content: Contains the content which should be uploaded
825825
:type content: ``binary``
826826
:param content_type: Specify the HTTP content type. The default is
827827
:type content_type: ``str``
@@ -1771,7 +1771,7 @@ def get_space_content(
17711771
):
17721772
"""
17731773
Get space content.
1774-
You can specify which type of content want to recieve, or get all content types.
1774+
You can specify which type of content want to receive, or get all content types.
17751775
Use expand to get specific content properties or page
17761776
:param content_type:
17771777
:param space_key: The unique space key name

atlassian/jira.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,7 @@ def user_disable_throw_rest_endpoint(
13391339
url="rest/scriptrunner/latest/custom/disableUser",
13401340
param="userName",
13411341
):
1342-
"""The disable method throw own rest enpoint"""
1342+
"""The disable method throw own rest endpoint"""
13431343
url = "{}?{}={}".format(url, param, username)
13441344
return self.get(path=url)
13451345

@@ -2552,7 +2552,7 @@ def reindex(
25522552
Not relevant for foreground reindex, where changeHistory is always reindexed.
25532553
:param worklogs: Indicates that changeHistory should also be reindexed.
25542554
Not relevant for foreground reindex, where changeHistory is always reindexed.
2555-
:param indexing_type: OPTIONAL: The default value for the type is BACKGROUND_PREFFERED
2555+
:param indexing_type: OPTIONAL: The default value for the type is BACKGROUND_PREFERRED
25562556
:return:
25572557
"""
25582558
params = {}
@@ -2575,7 +2575,7 @@ def reindex_with_type(self, indexing_type="BACKGROUND_PREFERRED"):
25752575
If Jira fails to finish the background reindexing, respond with 409 Conflict (error message).
25762576
BACKGROUND_PREFERRED - If possible do a background reindexing.
25772577
If it's not possible (due to an inconsistent index), do a foreground reindexing.
2578-
:param indexing_type: OPTIONAL: The default value for the type is BACKGROUND_PREFFERED
2578+
:param indexing_type: OPTIONAL: The default value for the type is BACKGROUND_PREFERRED
25792579
:return:
25802580
"""
25812581
return self.reindex(indexing_type=indexing_type)
@@ -2888,7 +2888,7 @@ def tempo_timesheets_get_configuration(self):
28882888

28892889
def tempo_timesheets_get_team_utilization(self, team_id, date_from, date_to=None, group_by=None):
28902890
"""
2891-
GEt team utulization. Response in json
2891+
Get team utilization. Response in json
28922892
:param team_id:
28932893
:param date_from:
28942894
:param date_to:

0 commit comments

Comments
 (0)