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

Pin pylint version in an attempt to prevent future spontaneous breakage of CI tests #891

Merged
merged 3 commits into from
Feb 24, 2021
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
1 change: 1 addition & 0 deletions lektor/buildfailures.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def lookup_failure(self, artifact_name):
except IOError as e:
if e.errno != errno.ENOENT:
raise
return None

def clear_failure(self, artifact_name):
"""Clears a stored failure."""
Expand Down
1 change: 1 addition & 0 deletions lektor/databags.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def load_databag(filename):
except (OSError, IOError) as e:
if e.errno != errno.ENOENT:
raise
return None


class Databags:
Expand Down
2 changes: 1 addition & 1 deletion lektor/imagetools.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def from_label(cls, label):
"""
name = label.upper().replace("-", "_")
try:
return cls.__members__[name] # pylint: disable=no-member
return cls.__members__[name] # pylint: disable=unsubscriptable-object
except KeyError as error:
raise ValueError("Invalid thumbnail mode '%s'." % label) from error

Expand Down
6 changes: 5 additions & 1 deletion lektor/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def locate_executable(exe_file, cwd=None, include_bundle_path=True):
return path + ext
return None
except OSError:
pass
return None


class JSONEncoder(json.JSONEncoder):
Expand Down Expand Up @@ -356,6 +356,7 @@ def safe_call(func, args=None, kwargs=None):
except Exception:
# XXX: logging
traceback.print_exc()
return None


class Worker(Thread):
Expand Down Expand Up @@ -600,6 +601,9 @@ def get_relative_path(source, target):
else:
# prepend the distance to the common ancestor
return distance / relpath
# We should never get here. (The last ancestor in source.parents will
# be '.' — target.relative_to('.') will always succeed.)
raise AssertionError("This should not happen")


def get_structure_hash(params):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

tests_require = [
"pre-commit",
"pylint",
"pylint==2.7.0",
"pytest",
"pytest-cov",
"pytest-mock",
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[tox]
minversion = 3
envlist = lint, py

[testenv]
Expand All @@ -18,7 +19,6 @@ paths =
.tox/coverage/*/lektor

[testenv:lint]
deps =
pylint
# NB: (Pinned) pylint is installed as part of the lektor[test] extras
commands =
pylint {posargs:lektor setup.py tests}