Skip to content

Commit

Permalink
Merge pull request #2 from aliartiza75/add-nested-list-support
Browse files Browse the repository at this point in the history
[add-nested-list-support] update listcompare.py file
  • Loading branch information
aliartiza75 authored Jul 18, 2020
2 parents 84dafc5 + 18c6bb7 commit ec65825
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python application

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with pycodestyle
run: |
pycodestyle listcompare/*.py
4 changes: 0 additions & 4 deletions listcompare/listcompare.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,5 @@ def compare_list(list1, list2):
for list2_item in list2:
if list2_item not in list1:
return False
# check item of list1 exists in list2
for list1_item in list1:
if list1_item not in list2:
return False
return True
raise Exception("Invalid Data provided")
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
twine==1.13.0
cython==0.29.12
pycodestyle==2.6.0

0 comments on commit ec65825

Please sign in to comment.