Skip to content

Commit 2660b2a

Browse files
mshaileshr@gmail.commshaileshr@gmail.com
authored andcommitted
v1.1.0 pylint applied.
score: 9.96/10
1 parent fa1c79d commit 2660b2a

File tree

4 files changed

+17
-30
lines changed

4 files changed

+17
-30
lines changed

contentstack/https_connection.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,11 @@ def user_agents():
3232
header = {'sdk': dict(name=contentstack.__package__, version=contentstack.__version__),
3333
'os': get_os_platform,
3434
'Content-Type': 'application/json'}
35-
package = "contentstack-python, - {}".format(contentstack.__version__)
35+
package = "contentstack-python/v{}".format(contentstack.__version__)
3636
return {'User-Agent': str(header), "X-User-Agent": package}
3737

3838

39-
# R0903: Too few public methods (1/2) (too-few-public-methods)
40-
# "pylint doesn't know what's best" - use your own judgement but as a rule.
41-
class HTTPSConnection:
39+
class HTTPSConnection: # R0903: Too few public methods
4240
"""Make Https Request to fetch the result as per requested url"""
4341

4442
def __init__(self, endpoint, headers):
@@ -72,15 +70,3 @@ def get(self, url):
7270
def update_connection_timeout(self, timeout: int):
7371
"""Facilitate to update timeout for the https request"""
7472
self.default_timeout = timeout
75-
76-
# def get_complete_url(self, base_url: str, params: dict):
77-
# """
78-
# creates complete url with the help of base_url and query parameters
79-
# :param base_url: base url
80-
# :param params: query parameters
81-
# :return: url
82-
# """
83-
# if 'query' in params:
84-
# params["query"] = json.dumps(params["query"])
85-
# query = urlparse.urlencode(params)
86-
# return '{}&{}'.format(base_url, query)

contentstack/utility.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def config_logging(logging_type: logging.WARNING):
2121
:return: basicConfig instance
2222
"""
2323
logging.basicConfig(
24-
filename='application.log',
24+
filename='app.log',
2525
level=logging_type,
2626
format='[%(asctime)s] {%(pathname)s:%(lineno)d} %(levelname)s - %(message)s',
2727
datefmt='%H:%M:%S'
@@ -63,8 +63,7 @@ def do_url_encode(params):
6363

6464
@staticmethod
6565
def get_complete_url(base_url: str, params: dict):
66-
"""
67-
creates complete url using base_url and their respective parameters
66+
""" creates complete url using base_url and their respective parameters
6867
:param base_url:
6968
:param params:
7069
:return:

requirements.txt

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
docutils~=0.16
2+
py~=1.9.0
23
dnspython~=2.0.0
34
idna~=2.10
45
pip~=20.2.1
@@ -8,6 +9,7 @@ pytz~=2020.1
89
Babel~=2.8.0
910
pkginfo~=1.5.0.1
1011
MarkupSafe~=2.0.0a1
12+
pytest~=6.0.1
1113
Sphinx~=3.1.2
1214
packaging~=20.4
1315
Jinja2~=3.0.0a1
@@ -16,19 +18,15 @@ enum34~=1.1.10
1618
requests~=2.24.0
1719
snowballstemmer~=2.0.0
1820
Pygments~=2.6.1
21+
attrs~=19.3.0
1922
certifi~=2020.6.20
2023
chardet~=3.0.4
24+
wcwidth~=0.2.5
2125
six~=1.15.0
26+
coverage~=5.2.1
2227
toml~=0.10.1
2328
urllib3~=1.25.10
2429
alabaster~=0.7.12
25-
pyparsing~=3.0.0.a2
30+
pyparsing~=3.0.0a2
2631
setuptools~=49.2.1
27-
zipp~=3.1.0
28-
html-testRunner~=1.2.1
29-
py~=1.9.0
30-
pytest~=6.0.1
31-
attrs~=19.3.0
32-
pluggy~=1.0.0.dev0
33-
wcwidth~=0.2.5
34-
coverage~=5.2.1
32+
zipp~=3.1.0

setup.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,15 @@
1010
except ImportError:
1111
from distutils.core import setup
1212

13-
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
13+
with open(os.path.join(os.path.dirname(__file__), 'readme.rst')) as readme:
1414
long_description = readme.read()
1515

1616
setup(
17-
name="contentstack",
17+
title="contentstack-python sdk for content-delivery-api",
18+
name="Contentstack",
19+
status="Active",
20+
type="process",
21+
created="17 Jun",
1822
keywords='contentstack-python',
1923
version="1.1.0",
2024
author="Contentstack",

0 commit comments

Comments
 (0)