Giter VIP home page Giter VIP logo

oyez-api-wrapper's People

Contributors

tylzars avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

joedemcher

oyez-api-wrapper's Issues

Changing return types/values

  1. Thank you for this project!
  2. This isn't an issue but just a curiosity. Why aren't you returning a None or an empty list for some of your calls instead of an explanatory string? Like for instance instead of:
    def get_legal_question(self, html = False):
        if html:
            question = self.json_data["question"]
        elif not self.json_data["question"]:
            question = "Legal Question Not Present"
        else: 
            question = re.sub('<[^<]+?>', '', self.json_data["question"])
        
        return question

You could return just None for the elif portion and users can check for it or try-catch it. Or for getting the case facts you do:

    def get_case_facts(self, html = False):
        if html:
            return_list = self.json_data["facts_of_the_case"]
        elif not self.json_data["facts_of_the_case"]: 
            return_list = "Facts of the case not present!"
        else:
            return_list = re.sub('<[^<]+?>', '', self.json_data["facts_of_the_case"])
        
        return return_list

Why not return an empty list for the elif portion? Returning a string here just seems out of place.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.