Skip to content

Commit

Permalink
Lint script against Python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
mjenczmyk committed Nov 12, 2019
1 parent 3b4723d commit f86ea06
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
dist: xenial
dist: bionic
language: python
python:
- "3.5"
- "3.6"
- "3.7"
- "3.8"
install: "pip install -e \".[dev]\""
script: pylama
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

dev_requirements = [
'mccabe==0.6.1',
'pycodestyle==2.4.0',
'pyflakes==2.0.0',
'pylama==7.6.5'
'pycodestyle==2.5.0',
'pyflakes==2.1.1',
'pylama==7.7.1'
]

setup(
Expand All @@ -44,6 +44,7 @@
classifiers=[
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7'
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8'
]
)
2 changes: 1 addition & 1 deletion src/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def download_products(api_client, download_directory, formats, product_list, int
try:
file_url = api_client.get(download_url).json().get('data')
r = api_client.get(file_url, timeout=100, stream=True)
if r.status_code is 200:
if r.status_code == 200:
try:
with open(temp_file_path, 'wb') as f:
total_length = int(r.headers.get('content-length'))
Expand Down
6 changes: 2 additions & 4 deletions src/utils/google_drive.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def check_if_file_exist_create_new_one(self, file_name, file_type="FOLDER", pare
logger.debug(file_name + " exists")
else:
logger.debug(file_name + " does not exist")
if file_type is "FILE":
if file_type == "FILE":
pass # TODO
else: # create new folder
id = self.__create_new_folder(file_name, parent_id)
Expand Down Expand Up @@ -170,9 +170,7 @@ def send_files(self, file_paths):
else:
logger.info('File {} already exists on Google Drive'.format(file_attrs[0]))
except Exception as e:
logger.error('Error {} occurred while sending file: {} to Google Drive'.format(
e, file_attrs[0])
)
logger.error('Error {} occurred while sending file: {} to Google Drive'.format(e, file_attrs[0]))

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

0 comments on commit f86ea06

Please sign in to comment.