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

[Backport][ipa-4-6] Disable Pylint 2.0 violations #2158

Closed
wants to merge 1 commit into from

Conversation

tiran
Copy link
Member

@tiran tiran commented Jul 16, 2018

This PR was opened automatically because PR #2150 was pushed to master and backport to ipa-4-6 is required.

@tiran
Copy link
Member Author

tiran commented Jul 16, 2018

PR was ACKed automatically because this is backport of PR #2150. Wait for CI to finish before pushing. In case of questions or problems contact @netoarmando who is author of the original PR.

@tiran tiran added the ack Pull Request approved, can be merged label Jul 16, 2018
@netoarmando
Copy link
Member

netoarmando commented Jul 16, 2018

@tiran perhaps PR #2085 should have been backported?

Globally disabling the following violations:

- `assignment-from-no-return` (E1111):
  Assigning to function call which doesn't return. Used when an
  assignment is done on a function call but the inferred function
  doesn't return anything.

- `keyword-arg-before-vararg` (W1113):
  Keyword argument before variable positional arguments list in the
  definition of %s function When defining a keyword argument before
  variable positional arguments, one can end up in having multiple
  values passed for the aforementioned parameter in case the method is
  called with keyword arguments.

Locally disabling the following:

- `subprocess-popen-preexec-fn` (W1509):
  Using preexec_fn keyword which may be unsafe in the presence of
  threads The preexec_fn parameter is not safe to use in the presence
  of threads in your application. The child process could deadlock
  before exec is called. If you must use it, keep it trivial! Minimize
  the number of libraries you call into.
  https://docs.python.org/3/library/subprocess.html#popen-constructor

Fixed violations:

- `bad-mcs-classmethod-argument` (C0204):
  Metaclass class method %s should have %s as first argument Used when
  a metaclass class method has a first argument named differently than
  the value specified in valid-metaclass-classmethod-first-arg option
  (default to "mcs"), recommended to easily differentiate them from
  regular instance methods.
  - Note: Actually `cls` is the default first arg for `__new__`.

- `consider-using-get` (R1715):
  Consider using dict.get for getting values from a dict if a key is
  present or a default if not Using the builtin dict.get for getting a
  value from a dictionary if a key is present or a default if not, is
  simpler and considered more idiomatic, although sometimes a bit slower

Issue: https://pagure.io/freeipa/issue/7614

Signed-off-by: Armando Neto <abiagion@redhat.com>
@tiran
Copy link
Member Author

tiran commented Jul 17, 2018

@netoarmando Thanks for noticing. I have included the pylint plugin change in this PR.

@tiran tiran added the pushed Pull Request has already been pushed label Jul 17, 2018
@tiran
Copy link
Member Author

tiran commented Jul 17, 2018

ipa-4-6:

  • 46344dd Disable Pylint 2.0 violations

@tiran tiran closed this Jul 17, 2018
@tiran tiran deleted the backport_pr2150_ipa-4-6 branch March 29, 2019 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack Pull Request approved, can be merged pushed Pull Request has already been pushed
Projects
None yet
2 participants