KOSASIH / ExoGenesis

Unused variable found PYL-W0612
Anti-pattern
Major
3 months ago3 months old
12    def train_model(self):
13        X = self.sensor_data
14        y = self.target_coordinates
15        X_train, X_test, y_train, y_test = train_test_split(16            X, y, test_size=0.2, random_state=42
17        )
18        self.model.fit(X_train, y_train)
12    def train_model(self):
13        X = self.sensor_data
14        y = self.target_coordinates
15        X_train, X_test, y_train, y_test = train_test_split(16            X, y, test_size=0.2, random_state=42
17        )
18        self.model.fit(X_train, y_train)
Unused variable 'article_titles'
 18    search_results = perform_web_search(query, num_articles)
 19
 20    # Extract the article titles and URLs from the search results
 21    article_titles = [result["title"] for result in search_results] 22    article_urls = [result["url"] for result in search_results]
 23
 24    # Summarize each article using a web service or library
18
19    # Get the list of files in the project
20    project_files = []
21    for root, dirs, files in os.walk("."):22        for file in files:
23            if file.endswith(".js") or file.endswith(".ts"):
24                project_files.append(os.path.join(root, file))
21
22    # Add edges between communication links and transaction fees based on their compatibility
23    for link in infrastructure_graph.edges:
24        for (body1, body2), fee in transaction_fees.items():25            if is_compatible(link, (body1, body2)):
26                bipartite_graph.add_edge(link, (body1, body2))
27