Skip to content

Commit f86ea06

Browse files
committed
Lint script against Python 3.8
1 parent 3b4723d commit f86ea06

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
dist: xenial
1+
dist: bionic
22
language: python
33
python:
44
- "3.5"
55
- "3.6"
66
- "3.7"
7+
- "3.8"
78
install: "pip install -e \".[dev]\""
89
script: pylama

setup.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515

1616
dev_requirements = [
1717
'mccabe==0.6.1',
18-
'pycodestyle==2.4.0',
19-
'pyflakes==2.0.0',
20-
'pylama==7.6.5'
18+
'pycodestyle==2.5.0',
19+
'pyflakes==2.1.1',
20+
'pylama==7.7.1'
2121
]
2222

2323
setup(
@@ -44,6 +44,7 @@
4444
classifiers=[
4545
'Programming Language :: Python :: 3.5',
4646
'Programming Language :: Python :: 3.6',
47-
'Programming Language :: Python :: 3.7'
47+
'Programming Language :: Python :: 3.7',
48+
'Programming Language :: Python :: 3.8'
4849
]
4950
)

src/downloader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def download_products(api_client, download_directory, formats, product_list, int
9595
try:
9696
file_url = api_client.get(download_url).json().get('data')
9797
r = api_client.get(file_url, timeout=100, stream=True)
98-
if r.status_code is 200:
98+
if r.status_code == 200:
9999
try:
100100
with open(temp_file_path, 'wb') as f:
101101
total_length = int(r.headers.get('content-length'))

src/utils/google_drive.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def check_if_file_exist_create_new_one(self, file_name, file_type="FOLDER", pare
106106
logger.debug(file_name + " exists")
107107
else:
108108
logger.debug(file_name + " does not exist")
109-
if file_type is "FILE":
109+
if file_type == "FILE":
110110
pass # TODO
111111
else: # create new folder
112112
id = self.__create_new_folder(file_name, parent_id)
@@ -170,9 +170,7 @@ def send_files(self, file_paths):
170170
else:
171171
logger.info('File {} already exists on Google Drive'.format(file_attrs[0]))
172172
except Exception as e:
173-
logger.error('Error {} occurred while sending file: {} to Google Drive'.format(
174-
e, file_attrs[0])
175-
)
173+
logger.error('Error {} occurred while sending file: {} to Google Drive'.format(e, file_attrs[0]))
176174

177175
def download_file(self, file_name, file_id):
178176
request = self._service.files().get_media(fileId=file_id)

0 commit comments

Comments
 (0)