Skip to content

Commit

Permalink
Polish doc strings and review tox.ini file for flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
gonchik committed Jan 2, 2022
1 parent 50b5c71 commit ef4757f
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 24 deletions.
2 changes: 1 addition & 1 deletion atlassian/bitbucket/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2658,7 +2658,7 @@ def download_repo_archive(
:param at: string: Optional, the commit to download an archive of; if not supplied, an archive of the default branch is downloaded
:param filename: string: Optional, a filename to include the "Content-Disposition" header
:param format: string: Optional, the format to stream the archive in; must be one of: zip, tar, tar.gz or tgz. If not specified, then the archive will be in zip format.
:param paths: string: Optional, path to include in the streamed archive
:param path: string: Optional, path to include in the streamed archive
:param prefix: string: Optional, a prefix to apply to all entries in the streamed archive; if the supplied prefix does not end with a trailing /, one will be added automatically
:param chunk_size: int: Optional, download chunk size. Defeault is 128
"""
Expand Down
11 changes: 6 additions & 5 deletions atlassian/bitbucket/cloud/workspaces/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ def create(self, name, key, description, is_private=True, avatar=None):
:return: The created project object
API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/workspaces/%7Bworkspace%7D/projects#post
API docs:
https://developer.atlassian.com/bitbucket/api/2/reference/resource/workspaces/%7Bworkspace%7D/projects#post
"""
data = {
"name": name,
Expand All @@ -51,12 +52,12 @@ def create(self, name, key, description, is_private=True, avatar=None):
def each(self, q=None, sort=None):
"""
Get all projects in the workspace matching the criteria.
:param q: string (default is None): Query string to narrow down the response.
See https://developer.atlassian.com/bitbucket/api/2/reference/meta/filtering for details.
See for details:
https://developer.atlassian.com/bitbucket/api/2/reference/meta/filtering
:param sort: string (default is None): Name of a response property to sort results.
See https://developer.atlassian.com/bitbucket/api/2/reference/meta/filtering for details.
See for details:
https://developer.atlassian.com/bitbucket/api/2/reference/meta/filtering
:return: A generator for the project objects
API docs: https://developer.atlassian.com/bitbucket/api/2/reference/resource/workspaces/%7Bworkspace%7D/projects#get
Expand Down
8 changes: 5 additions & 3 deletions atlassian/bitbucket/server/projects/repos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,11 @@ def download_archive(self, dest_fd, at=None, filename=None, format=None, path=No
:param dest_fd: a file-like object to which the archive will be written
:param at: string: Optional, the commit to download an archive of; if not supplied, an archive of the default branch is downloaded
:param filename: string: Optional, a filename to include the "Content-Disposition" header
:param format: string: Optional, the format to stream the archive in; must be one of: zip, tar, tar.gz or tgz. If not specified, then the archive will be in zip format.
:param paths: string: Optional, path to include in the streamed archive
:param prefix: string: Optional, a prefix to apply to all entries in the streamed archive; if the supplied prefix does not end with a trailing /, one will be added automatically
:param format: string: Optional, the format to stream the archive in; must be one of: zip, tar, tar.gz or tgz.
If not specified, then the archive will be in zip format.
:param path: string: Optional, path to include in the streamed archive
:param prefix: string: Optional, a prefix to apply to all entries in the streamed archive;
if the supplied prefix does not end with a trailing /, one will be added automatically
:param chunk_size: int: Optional, download chunk size. Defeault is 128
"""
params = {}
Expand Down
20 changes: 9 additions & 11 deletions atlassian/crowd.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,15 @@ def user_activate(self, username):

def user_create(self, username, active, first_name, last_name, display_name, email, password=None):
"""
Create new user
:param active: bool, OPTIONAL: password can be auto-generated if not included
username (string)
active (bool)
first-name (string)
last-name (string)
display-name (string)
email (string)
password (string, optional)
Create new user method
:param active: bool: OPTIONAL: password can be auto-generated if not included
:param username: string: username
:param active: bool:
:param first_name: string:
:param last_name: string:
:param display_name: string:
:param email: string:
:param password: string: OPTIONAL:
:return:
"""

Expand Down
5 changes: 3 additions & 2 deletions atlassian/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -1726,6 +1726,7 @@ def projects(self, included_archived=None, expand=None):
"""Returns all projects which are visible for the currently logged in user.
If no user is logged in, it returns the list of projects that are visible when using anonymous access.
:param included_archived: boolean whether to include archived projects in response, default: false
:param expand:
:return:
"""
params = {}
Expand Down Expand Up @@ -1919,8 +1920,8 @@ def update_version(
:param description: The version description
:param is_archived:
:param is_released:
:param startDate: The Start Date in isoformat. Example value is "2015-04-11T15:22:00.000+10:00"
:param releaseDate: The Release Date in isoformat. Example value is "2015-04-11T15:22:00.000+10:00"
:param start_date: The Start Date in isoformat. Example value is "2015-04-11T15:22:00.000+10:00"
:param release_date: The Release Date in isoformat. Example value is "2015-04-11T15:22:00.000+10:00"
"""
payload = {
"name": name,
Expand Down
1 change: 0 additions & 1 deletion atlassian/xray.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# coding=utf-8
import logging
import re
from requests import HTTPError
from .rest_client import AtlassianRestAPI

log = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ skip_install = true
deps =
flake8
flake8-no-fstring
commands = flake8
commands = flake8 {[base]linting_targets}

[testenv:pylint]
basepython = python3
Expand Down

0 comments on commit ef4757f

Please sign in to comment.