Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adambranch #5

Merged
merged 8 commits into from
Aug 26, 2020
Merged

Adambranch #5

merged 8 commits into from
Aug 26, 2020

Conversation

adamwjo
Copy link
Contributor

@adamwjo adamwjo commented Aug 25, 2020

No description provided.

@adamwjo adamwjo requested a review from aih August 25, 2020 19:30
@@ -1,14 +1,18 @@

#!/usr/bin/env python3

import sys, logging, argparse
import sys
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all this is auto pep8 formatting. Can adjust to fit whatever linter you have

return titlesIndex


def getSameTitles():
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still working on the logic here, It seems to be returning the incorrect bill numbers

@aih
Copy link
Collaborator

aih commented Aug 25, 2020

This is good progress!

I'd like to see the output as an object (currently, it seems you're printing each same_titles object). Also, you currently replace each sameTitlesIndex[bill]['same_titles'] value every time the bill appears.

Instead, you should:

  • check whether sameTitlesIndex[bill] exists
  • if it does not exist, create a list (not an object)
  • if it does exist, check whether the current bill number is in the list, and if not, append the bill number to the list.

@aih
Copy link
Collaborator

aih commented Aug 26, 2020

Very nice! I didn't know (or remember?) that you can add arrays like that.

@aih aih merged commit 47aa60e into master Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants