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

Linter enabled tests #1985

Merged
merged 8 commits into from
Aug 21, 2020
Merged

Conversation

kevinclark19a
Copy link
Contributor

Description

Enable linter to run on unit tests found as PR gate, and added error suppression to existing errors.


PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made and Travis.CI is passing.

Quality of Code and Contribution Guidelines

@codecov
Copy link

codecov bot commented Aug 19, 2020

Codecov Report

Merging #1985 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1985   +/-   ##
========================================
  Coverage    71.13%   71.13%           
========================================
  Files           86       86           
  Lines        12286    12286           
  Branches      1730     1730           
========================================
  Hits          8740     8740           
  Misses        3160     3160           
  Partials       386      386           
Impacted Files Coverage Δ
azurelinuxagent/agent.py 44.65% <ø> (ø)
azurelinuxagent/common/cgroupapi.py 79.25% <ø> (ø)
azurelinuxagent/common/cgroupconfigurator.py 73.20% <ø> (ø)
azurelinuxagent/common/conf.py 78.28% <ø> (ø)
azurelinuxagent/common/event.py 86.61% <ø> (ø)
azurelinuxagent/common/osutil/default.py 62.06% <ø> (ø)
azurelinuxagent/common/osutil/nsbsd.py 41.66% <ø> (ø)
azurelinuxagent/common/osutil/openbsd.py 23.37% <ø> (ø)
azurelinuxagent/common/protocol/goal_state.py 93.81% <ø> (ø)
azurelinuxagent/common/protocol/imds.py 95.45% <ø> (ø)
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6b00c9...8e918a7. Read the comment docs.

@@ -8,28 +8,38 @@
# attribute-defined-outside-init<W0201>: (hi-pri) Used when an instance attribute is defined outside the __init__ method.
# bad-continuation<C0330>: (needs review) **REMOVED in pylint-2.6.0**
# bad-indentation<W0311>: (hi-pri) Used when an unexpected number of indentation's tabulations or spaces has been found.
# bad-open-mode<W1501>: (hi-pri) Python supports: r, w, a[, x] modes with b, +, and U (only with r) options.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a comment for line 9 above

bad-continuation: (needs review) REMOVED in pylint-2.6.0

maybe we should disable this one globally (to the entire project)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can definitely do that.

Note that python2.6 and python3.4 are stuck on earlier versions that do have this symbol (any of 3.[6,7,8] might also get stuck on current stable, 2.5.3, which also has this symbol), so I'm not sure if that changes things. We could potentially leave this enabled in this file, and disable it for other versions once they update.

@@ -65,24 +65,24 @@ def test_cgroups_should_be_supported_only_on_ubuntu_16_and_later(self):
(['redhat', '7.7.1908', 'Core'], False),
(['bigip', '15.0.1', 'Final'], False),
(['gaia', '273.562', 'R80.30'], False),
(['debian' '9.1', ''], False),
(['debian' '9.1', ''], False), # pylint: disable=implicit-str-concat,implicit-str-concat-in-sequence
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

This is my bad. I just submitted #1986 fixing this. We can remove this suppression.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

narrieta
narrieta previously approved these changes Aug 20, 2020
@kevinclark19a kevinclark19a merged commit 09bed7b into Azure:develop Aug 21, 2020
@kevinclark19a kevinclark19a deleted the LinterEnabledTests branch August 21, 2020 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants