Skip to content

Instantly share code, notes, and snippets.

@bnsh
Created February 16, 2021 09:30
Show Gist options
  • Save bnsh/9f65791125e36180e38850b5980fba00 to your computer and use it in GitHub Desktop.
Save bnsh/9f65791125e36180e38850b5980fba00 to your computer and use it in GitHub Desktop.
This docker file demonstrates a seeming bug with pylint==2.6.1
# docker build -t binesh/pylint-bug .
# docker run --rm binesh/pylint-bug python3.8 -m pylint -r n /tmp/demo1.py
# docker run --rm binesh/pylint-bug python3.8 -m pylint -r n /tmp/demo2.py
FROM python:3.8
MAINTAINER Binesh Bannerjee <binesh_binesh@hotmail.com>
RUN /usr/local/bin/python3.8 -m pip install -U pylint==2.6.1
RUN echo "def func(blah):" > /tmp/demo1.py && \
echo " assert "x" not in blah or blah["x"] is None" >> /tmp/demo1.py
RUN echo "def div6():" > /tmp/demo2.py && \
echo " return [num for num in sorted([1, 2, 3, 4]) if (num % 2 == 0) and (num % 3 == 0)]" >> /tmp/demo2.py
RUN /usr/local/bin/python3.8 -m pip freeze
CMD ["/usr/local/bin/python3.8", "-m", "pylint", "-r", "n", "/tmp/demo1.py"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment