Skip to content

Instantly share code, notes, and snippets.

View pep8speaks's full-sized avatar
💭
Linting away...

PEP 8 Speaks pep8speaks

💭
Linting away...
View GitHub Profile
--- original/file_to_fix.py
+++ fixed/file_to_fix.py
@@ -93,7 +93,7 @@
with Timer() as t:
computation_time_update = (
- not self.root_node.fitted_operation or self.computation_time is None
+ not self.root_node.fitted_operation or self.computation_time is None
)
train_predicted = self.root_node.fit(input_data=input_data)
--- original/file_to_fix.py
+++ fixed/file_to_fix.py
@@ -2,7 +2,7 @@
from fedot.core.caching.base_cache import BaseCache
from contextlib import contextmanager, nullcontext
from fedot.core.operations.evaluation.operation_implementations.data_operations.categorical_encoders import (
- OneHotEncodingImplementation
+ OneHotEncodingImplementation
)
if TYPE_CHECKING:
--- original/file_to_fix.py
+++ fixed/file_to_fix.py
@@ -93,7 +93,7 @@
with Timer() as t:
computation_time_update = (
- not self.root_node.fitted_operation or self.computation_time is None
+ not self.root_node.fitted_operation or self.computation_time is None
)
train_predicted = self.root_node.fit(input_data=input_data)
--- original/file_to_fix.py
+++ fixed/file_to_fix.py
@@ -8,9 +8,9 @@
prints asdf
"""
x = None
- i =2+1
- if i==5:
- i = 6
- elif (x== None):
--- original/file_to_fix.py
+++ fixed/file_to_fix.py
@@ -244,7 +244,7 @@
XS_in, XS_t = lines[k + 2 + i].split()
if 'scale' in XS_t:
files[i] = scale_xs(XS_in)
- elif 'serpent'in XS_t:
+ elif 'serpent' in XS_t:
files[i] = serpent_xs(XS_in)
else:
--- original/file_to_fix.py
+++ fixed/file_to_fix.py
@@ -21,18 +21,18 @@
from .waves import TWave
from .gaussopt import (RayTransferMatrix, FreeSpace, FlatRefraction,
- CurvedRefraction, FlatMirror, CurvedMirror, ThinLens, ThickLens, GeometricRay,
- BeamParameter, waist2rayleigh, rayleigh2waist, geometric_conj_ab,
- geometric_conj_af, geometric_conj_bf, gaussian_conj,
- conjugate_gauss_beams)
--- original/file_to_fix.py
+++ fixed/file_to_fix.py
@@ -3,14 +3,14 @@
from django.db import transaction
from django.db.models import Q
from django.http import HttpResponse, HttpResponseRedirect, JsonResponse, \\
- FileResponse, HttpResponseNotFound
+ FileResponse, HttpResponseNotFound
from django.shortcuts import render, get_object_or_404, redirect
--- original/file_to_fix.py
+++ fixed/file_to_fix.py
@@ -1,8 +1,8 @@
#!/usr/bin/env python
-print ("Hello world!")
+print("Hello world!")
-print ("goodbye")
+print("goodbye")
--- original/file_to_fix.py
+++ fixed/file_to_fix.py
@@ -1,8 +1,8 @@
#!/usr/bin/env python
-print ("Hello world!")
+print("Hello world!")
-print ("goodbye")
+print("goodbye")
--- original/file_to_fix.py
+++ fixed/file_to_fix.py
@@ -1,8 +1,8 @@
#!/usr/bin/env python
-print ("Hello world!")
+print("Hello world!")
-print ("goodbye")
+print("goodbye")