KOSASIH / pipfs-hub

File opened without the with statement PTC-W0010
Anti-pattern
Critical
4 months ago4 months old
Use the with statement to open a file
150
151            if self.config["natural_language_processing"]["analyze_sentiment"]:
152                # Load text from file
153                text = open(154                    self.config["natural_language_processing"]["text_path"]
155                ).read()
156
Use the with statement to open a file
131        while True:
132            if self.config["natural_language_processing"]["recognize_entities"]:
133                # Load text from file
134                text = open(135                    self.config["natural_language_processing"]["text_path"]
136                ).read()
137