Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve pylint possibly-used-before-assignment #262

Merged
merged 1 commit into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fract4d/fractal.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def save(self, file, update_saved_flag=True, **kwds):

if compress:
file.close()
print(file.getvalue(), file=main_file)
print(file.getvalue(), file=main_file) # pylint: disable=possibly-used-before-assignment

if update_saved_flag:
self.saved = True
Expand Down
1 change: 1 addition & 0 deletions fract4d/gradient.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ def get_color_at(self, pos):
mpos = (self.mid - self.left) / len
pos = (pos - self.left) / len

# pylint: disable=possibly-used-before-assignment
if self.bmode == Blend.LINEAR:
factor = self.get_linear_factor(pos, mpos)
elif self.bmode == Blend.CURVED:
Expand Down
1 change: 1 addition & 0 deletions fract4d/tests/test_fract4d.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@ def testFDSite(self):
# we use a buffer here like in gtkfractal.py "onData"
nb = 2 * 4
bytes = b""
temp = b""
while True:
# wait up to 1 sec until we can read, otherwise we assume the counterpart is gone (an error ocurred on the C++ layer)
r, w, e = select.select([rfd], [], [], 1)
Expand Down
1 change: 1 addition & 0 deletions fract4d_compiler/translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,7 @@ def declarray(self, node):
atype)

def exp(self, node):
# pylint: disable=possibly-used-before-assignment
if node.type == "const":
r = self.const(node)
elif node.type == "id":
Expand Down
Loading