Skip to content

Commit

Permalink
Remove unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
deepsource-autofix[bot] authored Apr 24, 2020
1 parent 282ddb2 commit ec4a3bf
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/components/pdf_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def average_data(self, n: int = 10, optlist: List[int] = None):
optlist = [1, 2, 3]
summed_data = self.data

for i in range(n):
for _ in range(n):
summed_data = [summed_data[i] + el for i, el in enumerate(self.data)]
time.sleep(0.25)

Expand Down
2 changes: 1 addition & 1 deletion examples/simple_thing.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def average_data(self, n: int):
summed_data = self.data

logging.warning("Starting an averaged measurement. This may take a while...")
for i in range(n):
for _ in range(n):
summed_data = [summed_data[i] + el for i, el in enumerate(self.data)]
update_task_data({"data": summed_data})
time.sleep(0.25)
Expand Down
2 changes: 1 addition & 1 deletion labthings/server/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def std_handler(self, error):
def init_app(self, app):
self.app = app
self.register(HTTPException)
for code, v in default_exceptions.items():
for code, _ in default_exceptions.items():
self.register(code)
self.register(Exception)

Expand Down
2 changes: 1 addition & 1 deletion labthings/server/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def find_extensions_in_file(extension_path: str, module_name="extensions") -> li

try:
spec.loader.exec_module(mod)
except Exception as e: # skipcq: PYL-W0703
except Exception: # skipcq: PYL-W0703
logging.error(
f"Exception in extension path {extension_path}: \n{traceback.format_exc()}"
)
Expand Down
2 changes: 1 addition & 1 deletion labthings/server/quick.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def create_app(

# Handle CORS
if handle_cors:
cors_handler = CORS(app, resources=f"{prefix}/*")
CORS(app, resources=f"{prefix}/*")

# Create a LabThing
labthing = LabThing(
Expand Down

0 comments on commit ec4a3bf

Please sign in to comment.