eyecite icon indicating copy to clipboard operation
eyecite copied to clipboard

Don't set court='scotus' for South Carolina citations #84

Open devlux76 opened this issue 3 years ago • 6 comments

This addresses issue #84. The issue was caused because SC is treated differently than S.C. when searching and scotus is the default return result. Since all court strings are unique with or without punctuation, stripping all punctuation and converting to the same case allows for an exact comparison instead of the "startswith" comparison that was previously being used.

devlux76 avatar Dec 25 '21 15:12 devlux76

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Dec 25 '21 15:12 CLAassistant

@jcushman do you have any bandwidth or interest in taking a look at this one?

@devlux76, thanks! Looks like you need to do a little linting work now that tests have completed though.

mlissner avatar Dec 27 '21 20:12 mlissner

@mlissner I'm sorry, I don't understand.

Looks like you need to do a little linting work now that tests have completed though.

Can you please give me more info about what needs to be done here? Thanks!

devlux76 avatar Dec 27 '21 20:12 devlux76

Linters are programs that check your work to make sure it's clean and pretty and using best practices. We have a few of them that were in Github Actions, but we didn't have a good process for developers to actually run them, so I just added a dev dependency for pre-comit to this branch. We use this in most of our other projects, so it seems reasonable to use it here too.

After adding it, I ran it, it cleaned up and highlighted a few problems with your code, which I fixed for you.

So this is ready for review again, but I'll wait for Jack to see if he wants to look at it. If not, I'll jump back in.

mlissner avatar Dec 27 '21 21:12 mlissner

Ok, I understand on the linting. I guess I'm so used to golint autoliniting my code that I forgot python doesn't do this automatically.

So for future reference, is there a particular process I should use prior to committing?

devlux76 avatar Dec 27 '21 22:12 devlux76

If you run pre-commit install in your repo, it'll install a git hook that runs the pre-commit checks before each commit. If it fails, some things (like formatting) will be fixed automatically, and you can just re-run your git commit. Other things will report errors you'll have to fix yourself. But that's the heart of it, and you'll write better code as a result.

mlissner avatar Dec 27 '21 22:12 mlissner